Skip to content

Commit 3da68f7

Browse files
author
thr3a
committed
add: cuda12.4
1 parent 6de3128 commit 3da68f7

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

cuda12.4-torch/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM --platform=linux/x86_64 nvcr.io/nvidia/cuda:12.4.1-cudnn8-devel-ubuntu24.04
2+
3+
ARG PYTHON_VERSION=3.12
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+
12+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv f23c5a6cf475977595c89f51ba6932366a755776 \
13+
&& echo "deb http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/python.list \
14+
&& echo "deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list.d/python.list
15+
16+
RUN apt-get update \
17+
&& apt-get install -y --no-install-recommends ${PACKAGES} python${PYTHON_VERSION} \
18+
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python \
19+
&& ln -nfs /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 \
20+
&& rm -rf /var/lib/apt/lists/* \
21+
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python -
22+
RUN pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
23+
24+
WORKDIR /app

cuda12.4-torch/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
docker-compose.yml
2+
3+
```yml
4+
version: "3"
5+
6+
services:
7+
app:
8+
build:
9+
context: .
10+
dockerfile: Dockerfile
11+
image: peft-workspace:latest
12+
stop_grace_period: 0s
13+
ipc: host
14+
tty: true
15+
deploy:
16+
resources:
17+
reservations:
18+
devices:
19+
- driver: nvidia
20+
device_ids: ['1']
21+
capabilities: [gpu]
22+
volumes:
23+
- "./:/app"
24+
- "./cache:/root/.cache"
25+
# command: sleep infinity
26+
command: python train_rinna.py
27+
```

0 commit comments

Comments
 (0)