This repository builds reusable hardware/runtime base images for downstream application images.
The public image contract is:
ghcr.io/offloadr/base/cpu-coreghcr.io/offloadr/base/amd-coreghcr.io/offloadr/base/amd-fullghcr.io/offloadr/base/nvidia-coreghcr.io/offloadr/base/nvidia-full
The default tags use Python 3.12 and 3.13 with PyTorch 2.14.1. NVIDIA uses CUDA 13.0.3; AMD uses ROCm 7.2.4:
cpu-core:py3.12-torch2.14.1-cpucpu-core:py3.13-torch2.14.1-cpuamd-core:py3.12-torch2.14.1-rocm7.2.4amd-core:py3.13-torch2.14.1-rocm7.2.4amd-full:py3.12-torch2.14.1-rocm7.2.4amd-full:py3.13-torch2.14.1-rocm7.2.4nvidia-core:py3.12-torch2.14.1-cuda13.0.3nvidia-core:py3.13-torch2.14.1-cuda13.0.3nvidia-full:py3.12-torch2.14.1-cuda13.0.3nvidia-full:py3.13-torch2.14.1-cuda13.0.3
All published runtime images are expected to provide:
WORKDIR /workspacepythoncommand backed by uv-managed CPythonuv0.13.5- built-in virtual environment at
/opt/venvwith the base Python packages UV_CONSTRAINT=/opt/offloadr/constraints/torch-stack.txtto pintorch,torchvision, andtorchaudioUV_TORCH_BACKENDset to the image's CPU/CUDA/ROCm flavor
amd-full also contains these accelerator packages in the built-in venv:
- xFormers
nvidia-full also contains these accelerator packages in the built-in venv:
- xFormers
- SageAttention2++
The runtime starts from NVIDIA's minimal CUDA base image. PyTorch's CUDA
wheels supply the math libraries, avoiding a second copy from NVIDIA's larger
runtime image. Extension builders use the CUDA devel image.
The opt-in nvidia-hopper image adds FlashAttention 3 for Hopper GPUs
(H100/H800). Its tags use the same Python/PyTorch/CUDA suffixes, for example
nvidia-hopper:py3.12-torch2.14.1-cuda13.0.3.
To build and publish the Hopper image, run the main-branch workflow manually
with build_hopper enabled. Standard builds include nvidia-core and
nvidia-full.
The host provides the NVIDIA driver; the image provides its CUDA runtime. A matching host CUDA Toolkit installation is not required. For Vast.ai, RunPod, QuickPod, Shadeform and similar rentals, select a host advertising CUDA 13.0 or newer (driver branch R580 or newer). Check the actual driver capability before renting; a template's installed CUDA Toolkit version is not the driver limit.
Hosts below CUDA 13.0 need a separately maintained older runtime. NVIDIA's compatibility documentation explains driver requirements and PTX/JIT limitations.
PyTorch and torchvision are pinned to their cu130 wheels, including the CUDA
suffix in the inherited constraints. TorchAudio 2.11.0 uses the same index and
supports PyTorch 2.11 and later.
xFormers and optional FlashAttention 3 use stable-ABI CUDA 13 wheels published
in the cu130 index; SageAttention is built with the CUDA 13.0 toolkit. Builds
check package versions, Torch's CUDA flavor and accelerator imports without
requiring a GPU. Actual attention kernels still need GPU validation.
Run a quick local check with the CPU images:
docker buildx bake cpu-core --pull --loadBuild the standard images locally:
docker buildx bake --pullBuild a specific image:
docker buildx bake nvidia-fullBuild a specific Python and PyTorch flavor:
docker buildx bake nvidia-full-py312-torch2141Build the opt-in Hopper image (also builds its standard-image dependencies):
docker buildx bake nvidia-hopper-py312-torch2141