base-pytorch-cuda (v2026.09.25-r4943)

Published 2026-09-24 23:18:18 -05:00 by gitchegumi

Installation

docker pull git.gitchegumi.com/homelab/base-pytorch-cuda:v2026.09.25-r4943
sha256:49dcc984d900b5ae6bf5a42cf780a76f40fa4e9075012c5cf085a0980e6e0bbb

About this package

Reusable PyTorch 2.9.1 and CUDA 13.0 runtime for Homelab applications

Image layers

ARG RELEASE
ARG LAUNCHPAD_BUILD_ARCH
LABEL org.opencontainers.image.ref.name=ubuntu
LABEL org.opencontainers.image.version=22.04
ADD file:32d41b6329e8f89fa4ac92ef97c04b7cfd5e90fb74e1509c3e27d7c91195b7c7 in /
CMD ["/bin/bash"]
ARG PYTORCH_VERSION=2.9.1
ARG TRITON_VERSION=
ARG TARGETPLATFORM=linux/amd64
ARG CUDA_VERSION=13.0.0
LABEL com.nvidia.volumes.needed=nvidia_driver
RUN |4 PYTORCH_VERSION=2.9.1 TRITON_VERSION= TARGETPLATFORM=linux/amd64 CUDA_VERSION=13.0.0 /bin/sh -c apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates libjpeg-dev libpng-dev && rm -rf /var/lib/apt/lists/* # buildkit
COPY /opt/conda /opt/conda # buildkit
RUN |4 PYTORCH_VERSION=2.9.1 TRITON_VERSION= TARGETPLATFORM=linux/amd64 CUDA_VERSION=13.0.0 /bin/sh -c if test -n "${TRITON_VERSION}" -a "${TARGETPLATFORM}" != "linux/arm64"; then DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends gcc; rm -rf /var/lib/apt/lists/*; fi # buildkit
ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PYTORCH_VERSION=2.9.1
WORKDIR /workspace
LABEL org.opencontainers.image.title=Homelab PyTorch/CUDA base org.opencontainers.image.description=Reusable PyTorch 2.9.1 and CUDA 13.0 runtime for Homelab applications org.opencontainers.image.source=https://git.gitchegumi.com/Homelab/base-images org.opencontainers.image.documentation=https://git.gitchegumi.com/Homelab/base-images/src/branch/main/images/pytorch-cuda/README.md org.opencontainers.image.vendor=Homelab org.opencontainers.image.version=2.9.1-cuda13.0-cudnn9-runtime org.opencontainers.image.base.name=docker.io/pytorch/pytorch:2.9.1-cuda13.0-cudnn9-runtime org.opencontainers.image.base.digest=sha256:60f22fb80755fd0b470fb47928dbd55816aa9f847edd95cf43c93253507a9ddf
RUN /bin/sh -c find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) -exec sed -i -e 's|http://archive.ubuntu.com/ubuntu|https://archive.ubuntu.com/ubuntu|g' -e 's|http://security.ubuntu.com/ubuntu|https://security.ubuntu.com/ubuntu|g' {} + && apt-get update -o APT::Update::Error-Mode=any && apt-get install --yes --no-install-recommends gpgv=2.2.27-3ubuntu2.5 libssl3=3.0.2-0ubuntu1.29 openssl=3.0.2-0ubuntu1.29 && apt-get purge --yes linux-libc-dev && rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c python -m pip install --no-cache-dir --no-deps --only-binary=:all: jaraco.context==6.1.2 msgpack==1.2.1 Pillow==12.3.0 setuptools==84.0.0 soupsieve==2.8.4 urllib3==2.8.0 wheel==0.47.0 && python -c "import pathlib, setuptools; vendor = pathlib.Path(setuptools.__file__).parent / '_vendor'; assert setuptools.__version__ == '84.0.0'; assert (vendor / 'jaraco_context-6.1.0.dist-info' / 'METADATA').is_file(); assert (vendor / 'wheel-0.46.3.dist-info' / 'METADATA').is_file(); assert not (vendor / 'jaraco.context-5.3.0.dist-info').exists(); assert not (vendor / 'wheel-0.45.1.dist-info').exists()" # buildkit
COPY smoke.py /usr/local/bin/pytorch-cuda-smoke.py # buildkit
RUN /bin/sh -c groupadd --gid 1000 app && useradd --uid 1000 --gid app --create-home --home-dir /home/app --shell /bin/bash app && install -d -o app -g app /workspace # buildkit
ENV HOME=/home/app
WORKDIR /workspace
USER 1000:1000
RUN /bin/sh -c python /usr/local/bin/pytorch-cuda-smoke.py # buildkit
HEALTHCHECK {Test:[CMD python -c import sys, torch; sys.exit(0 if torch.version.cuda == '13.0' and torch.ones(2).sum().item() == 2 else 1)] Interval:5m0s Timeout:30s StartPeriod:30s StartInterval:0s Retries:2}

Labels

Key Value
com.nvidia.volumes.needed nvidia_driver
org.opencontainers.image.base.digest sha256:60f22fb80755fd0b470fb47928dbd55816aa9f847edd95cf43c93253507a9ddf
org.opencontainers.image.base.name docker.io/pytorch/pytorch:2.9.1-cuda13.0-cudnn9-runtime
org.opencontainers.image.description Reusable PyTorch 2.9.1 and CUDA 13.0 runtime for Homelab applications
org.opencontainers.image.documentation https://git.gitchegumi.com/Homelab/base-images/src/branch/main/images/pytorch-cuda/README.md
org.opencontainers.image.ref.name ubuntu
org.opencontainers.image.revision 885676059e19eac196f9fd5e605045516b3b7818
org.opencontainers.image.source https://git.gitchegumi.com/Homelab/base-images
org.opencontainers.image.title Homelab PyTorch/CUDA base
org.opencontainers.image.vendor Homelab
org.opencontainers.image.version 2.9.1-cuda13.0-cudnn9-runtime
Details
Container
2026-09-24 23:18:18 -05:00
197
OCI / Docker
linux/amd64
2.9 GiB
Versions (2) View all