File tree Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ENV TZ=Asia/Tokyo
8
8
ENV PYTHONUNBUFFERED=1
9
9
ENV PIP_NO_CACHE_DIR=on
10
10
ENV PYTHONDONTWRITEBYTECODE=1
11
- ENV UV_PROJECT_ENVIRONMENT="/usr/local/ "
11
+ ENV UV_PROJECT_ENVIRONMENT="/usr/"
12
12
13
13
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv f23c5a6cf475977595c89f51ba6932366a755776 \
14
14
&& echo "deb http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/python.list \
@@ -19,8 +19,8 @@ RUN apt-get update \
19
19
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python \
20
20
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
21
21
&& rm -rf /var/lib/apt/lists/* \
22
- && curl -sSL https://bootstrap.pypa.io/get-pip.py | python -
23
- RUN pip install uv
22
+ && curl -sSL https://bootstrap.pypa.io/get-pip.py | python - \
23
+ && pip install uv
24
24
RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
25
25
26
26
WORKDIR /app
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ services:
27
27
Dockerfile
28
28
29
29
` ` ` dockerfile
30
- FROM ghcr.io/thr3a/ cuda12.4-torch:latest
30
+ FROM cuda12.4-torch:latest
31
31
32
32
WORKDIR /app
33
33
# COPY ./requirements.txt ./
Original file line number Diff line number Diff line change
1
+ FROM --platform=linux/x86_64 nvcr.io/nvidia/cuda:12.6.3-cudnn-devel-ubuntu24.04
2
+
3
+ ARG PYTHON_VERSION=3.13
4
+ ARG PACKAGES="git curl ca-certificates vim wget unzip build-essential cmake jq"
5
+
6
+ ENV DEBIAN_FRONTEND=noninteractive
7
+ ENV TZ=Asia/Tokyo
8
+ ENV PYTHONUNBUFFERED=1
9
+ ENV PIP_NO_CACHE_DIR=on
10
+ ENV PYTHONDONTWRITEBYTECODE=1
11
+ ENV UV_PROJECT_ENVIRONMENT="/usr/"
12
+
13
+ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv f23c5a6cf475977595c89f51ba6932366a755776 \
14
+ && echo "deb http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/python.list \
15
+ && echo "deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list.d/python.list
16
+
17
+ RUN apt-get update \
18
+ && apt-get install -y --no-install-recommends ${PACKAGES} python${PYTHON_VERSION} \
19
+ && ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python \
20
+ && ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
21
+ && rm -rf /var/lib/apt/lists/* \
22
+ && curl -sSL https://bootstrap.pypa.io/get-pip.py | python - \
23
+ && pip install uv
24
+ RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
25
+
26
+ WORKDIR /app
Original file line number Diff line number Diff line change
1
+ docker-compose.yml
2
+
3
+ ``` yml
4
+ services :
5
+ app :
6
+ build :
7
+ context : .
8
+ dockerfile : Dockerfile
9
+ image : peft-workspace:latest
10
+ stop_grace_period : 0s
11
+ ipc : host
12
+ tty : true
13
+ deploy :
14
+ resources :
15
+ reservations :
16
+ devices :
17
+ - driver : nvidia
18
+ device_ids : ['1']
19
+ capabilities : [gpu]
20
+ volumes :
21
+ - " ./:/app"
22
+ - " ./cache:/root/.cache"
23
+ # command: sleep infinity
24
+ command : python train_rinna.py
25
+ ` ` `
26
+
27
+ Dockerfile
28
+
29
+ ` ` ` dockerfile
30
+ FROM thr3a/cuda12.6-torch:latest
31
+
32
+ WORKDIR /app
33
+ # COPY ./requirements.txt ./
34
+ # RUN pip install -r requirements.txt
35
+
36
+ COPY pyproject.toml ./
37
+ COPY uv.lock ./
38
+ RUN uv sync --frozen --no-cache
39
+ ```
You can’t perform that action at this time.
0 commit comments