-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 1005 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM nvcr.io/nvidia/pytorch:24.03-py3
SHELL ["/bin/bash", "-lc"]
# --- OS deps ---
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl pciutils screen && \
rm -rf /var/lib/apt/lists/*
# --- Upgrade pip toolchain ---
RUN python -m pip install --no-cache-dir -U pip setuptools wheel
# --- Pin CUDA 12.4 PyTorch stack (torch >= 2.6.0) ---
ARG TORCH_VER=2.6.0
ARG TV_VER=0.21.0
ARG TA_VER=2.6.0
ARG TORCH_INDEX_URL=https://download.pytorch.org/whl/cu124
RUN python -m pip uninstall -y torch torchvision torchaudio || true && \
python -m pip install --no-cache-dir --index-url ${TORCH_INDEX_URL} \
torch==${TORCH_VER} torchvision==${TV_VER} torchaudio==${TA_VER}
RUN python -m pip install --no-cache-dir flair==0.15.1
# --- Install project requirements (includes transformers >= 4.55.0) ---
WORKDIR /app
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --no-cache-dir -r /tmp/requirements.txt
COPY . /app