44 lines
915 B
Docker
44 lines
915 B
Docker
FROM nvidia/cuda:12.4.1-devel-ubuntu22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3.12 \
|
|
python3.12-venv \
|
|
python3.12-dev \
|
|
python3-pip \
|
|
git \
|
|
curl \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
|
|
|
|
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
|
|
|
|
RUN python -m pip install --no-cache-dir \
|
|
torch==2.3.1 \
|
|
torchvision==0.18.1 \
|
|
torchaudio==2.3.1 \
|
|
--index-url https://download.pytorch.org/whl/cu124
|
|
|
|
RUN python -m pip install --no-cache-dir \
|
|
numpy \
|
|
pandas \
|
|
scikit-learn \
|
|
matplotlib \
|
|
jupyter \
|
|
transformers \
|
|
datasets \
|
|
accelerate \
|
|
safetensors
|
|
|
|
WORKDIR /workspace
|
|
|
|
VOLUME ["/workspace", "/models"]
|
|
|
|
EXPOSE 8888
|
|
|
|
CMD ["python"]
|