File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
+ ` ` `
You can’t perform that action at this time.
0 commit comments