DIY PyTorch GPU image based on nVidia CUDA image
223
Dockerfile
FROM nvidia/cuda:12.2.0-base-ubuntu22.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
git \
python3-pip \
python3-dev \
python3-opencv \
libglib2.0-0
# Install any python packages you need
COPY requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt
# Upgrade pip
RUN python3 -m pip install --upgrade pip
# Install PyTorch and torchvision
RUN pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
# Set the working directory
WORKDIR /app
# Set the entrypoint
ENTRYPOINT [ "python3" ]
Content type
Image
Digest
sha256:df5d2e408…
Size
6.1 GB
Last updated
about 2 years ago
docker pull geosci/pytorch-gpu