Skip to content

Commit 0875b94

Browse files
author
thr3a
committed
add: cuda 12.6
1 parent a540fd1 commit 0875b94

File tree

4 files changed

+69
-4
lines changed

4 files changed

+69
-4
lines changed

cuda12.4-torch/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ENV TZ=Asia/Tokyo
88
ENV PYTHONUNBUFFERED=1
99
ENV PIP_NO_CACHE_DIR=on
1010
ENV PYTHONDONTWRITEBYTECODE=1
11-
ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
11+
ENV UV_PROJECT_ENVIRONMENT="/usr/"
1212

1313
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv f23c5a6cf475977595c89f51ba6932366a755776 \
1414
&& 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 \
1919
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python \
2020
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
2121
&& 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
2424
RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124
2525

2626
WORKDIR /app

cuda12.4-torch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727
Dockerfile
2828
2929
```dockerfile
30-
FROM ghcr.io/thr3a/cuda12.4-torch:latest
30+
FROM cuda12.4-torch:latest
3131

3232
WORKDIR /app
3333
# COPY ./requirements.txt ./

cuda12.6-torch/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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

cuda12.6-torch/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
```

0 commit comments

Comments
 (0)