notebooks/components/example-notebook-servers/jupyter-pytorch/Dockerfile

22 lines
686 B
Docker

#
# NOTE: Use the Makefiles to build this image correctly.
#
ARG BASE_IMG=<jupyter>
FROM $BASE_IMG
# args - software versions
ARG PYTORCH_VERSION=2.1.0
ARG TORCHAUDIO_VERSION=2.1.0
ARG TORCHVISION_VERSION=0.16.0
# install - pytorch (cpu)
RUN python3 -m pip install --quiet --no-cache-dir --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple \
torch==${PYTORCH_VERSION} \
torchvision==${TORCHVISION_VERSION} \
torchaudio==${TORCHAUDIO_VERSION}
# install - requirements.txt
COPY --chown=${NB_USER}:users requirements.txt /tmp
RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir \
&& rm -f /tmp/requirements.txt