RunPod Containers
repository·main·Indexed 42 days ago
https://github.com/runpod/containersOfficial Dockerfiles and templates for RunPod, including Base images, AutoResearch environments, ComfyUI, NVIDIA PyTorch, and specialized PyTorch Cluster images for multi-node GPU clusters with RDMA/InfiniBand and Grafana monitoring.
What's inside RunPod Containers
- Runpod ROCm images are AMD GPU-accelerated containers designed for PyTorch workloads. They are built on Runpod base images and include the AMD GPU compute platform (ROCm 6.4.4), optimized PyTorch, and a full development environment featuring Jupyter, SSH, and standard ML libraries.
Overview of Runpod Base images
mainRunpod Base images are lean, flexible environments designed for machine learning workflows, supporting both CPU-only and GPU workloads. They can be used as standalone workspaces or as a foundation for building custom images.
Key Features:
- Python Support: Preinstalled versions 3.9–3.13 (3.10 is the default).
- ML Ready: Includes essential libraries for scientific computing, computer vision, and machine learning, plus SLURM support.
- Remote Access: Preconfigured SSH server for remote development and debugging.
- Optimized Workspace: Optimized directory structures and package caches for faster dependency installation and execution.
- Jupyter Support: Includes Notebook and JupyterLab with widgets/extensions.
Overview of Runpod PyTorch optimized images
mainRunpod PyTorch provides pre-configured Docker images optimized for deep learning workflows. These containers are designed to eliminate compatibility guesswork by providing tested combinations of PyTorch and CUDA.
Key features include:
- Zero setup: PyTorch is ready to import immediately.
- GPU acceleration: Full CUDA support is enabled out of the box.
- Audio/Video support:
torchaudiois matched to each PyTorch version. For images with PyTorch 2.9 and later,torchcodecis included, providingtorchaudio.loadandsavewrappers and enabling GPU video decoding via NVDEC (replacing the removedtorchaudio.io).
Use the PyTorch Cluster image for multi-node GPU clusters
mainThe
pytorch-clusterimage is a specialized variant of the standardrunpod/pytorchimage designed for multi-node GPU clusters. It adds two critical layers:- RDMA / InfiniBand user-space stack: Includes
libibverbs1,ibverbs-providers,rdma-core,ibverbs-utils,infiniband-diags, andperftestfor high-speed interconnects. - Monitoring Stack: A self-contained stack managed by
supervisordthat provides cluster-wide observability.
Image Tagging Convention: Tags follow the standard PyTorch scheme with a
-clustersuffix. Example:runpod/pytorch:<version>-cu1281-torch280-ubuntu2404-cluster.runpod/pytorch:<version>-cu<cuda_version>-torch<torch_version>-ubuntu<os_version>-cluster- RDMA / InfiniBand user-space stack: Includes
How the PyTorch Cluster monitoring stack works
mainThe monitoring architecture is split between all nodes and a single head node (
node-0) to ensure efficient data collection without excessive overhead.Node Roles
- Every Node: Runs
node_exporter(port:9100) anddcgm-exporter(port:9400) viasupervisordto collect system and GPU metrics. node-0(Head Node): Runs the central monitoring services: Prometheus (127.0.0.1:9090) and Grafana (accessible via public port:8889through an auth proxy).
Startup Lifecycle
The
/post_start.shhook executes at startup:- On
node-0: It scans/etc/hostsfor peers starting withnode-to configure Prometheus scrape targets for the entire cluster. It then starts Prometheus and Grafana. - On all nodes: It starts
supervisordto manage the exporters.
Inspecting Services
You can check the status of running monitoring services using
supervisorctl status. Logs are located at/var/log/supervisor/.supervisorctl status- Every Node: Runs
Container Requirements for Runpod Platform Functionality
mainTo ensure full compatibility with the Runpod platform, all container images must include the following dependencies:
nginx: Necessary for proxying ports to the user.openssh-server: Required for providing SSH access to the container.jupyterlab: Required for providing JupyterLab access to the container.
Getting started with Runpod AutoResearch
mainRunpod AutoResearch provides a pre-configured environment for running autonomous ML research experiments. To use it, launch a pod using the AutoResearch template, connect your preferred AI coding agent (such as Claude Code or Cursor) via SSH, and initiate the experiment loop by instructing the agent to read the program specification.
Workflow:
- Launch a pod with the AutoResearch template.
- Connect your coding agent via SSH.
- Command the agent to start the experiment loop using the following instruction:
Read /workspace/autoresearch/program.md and let's kick off a new experiment!
Read /workspace/autoresearch/program.md and let's kick off a new experiment!Verify NCCL connectivity and performance
mainTo verify that NCCL (NVIDIA Collective Communications Library) is correctly configured and functioning within a RunPod container, run the provided verification script. This is useful for ensuring multi-GPU communication is working as expected.
- SSH into your running pod.
- Execute the
check_nccl.shscript from the root directory of the container.
./check_nccl.shAccess Grafana dashboards via auto-login
mainGrafana is accessible on port
8889(ensure this port is exposed on thenode-0pod). Access is managed via a seamless auto-login proxy that mirrors the Jupyter shared-token model.Authentication via
JUPYTER_PASSWORDInstead of a separate login, Grafana uses the existing
$JUPYTER_PASSWORDenvironment variable.- Setup: Ensure the pod has the
JUPYTER_PASSWORDenvironment variable set. - Access: The console will open a URL in the format:
https://<pod>-8889.<proxy-base>/?token=<JUPYTER_PASSWORD>. - Mechanism: The proxy (
config/grafana-proxy/auth_proxy.py) validates the?token=parameter againstJUPYTER_PASSWORD. If it matches, it proxies the request to the internal Grafana instance (:3300) and injects theX-WEBAUTH-Userheader.
Configuration Notes
- Custom Token: Set
GRAFANA_PASSWORDif you want a specific token for Grafana that differs from Jupyter. - Dev Environments: If working in a dev environment, set
RUNPOD_PROXY_BASE=dev-proxy.runpod.netso the startup script builds the correctroot_url. - Security: Standard username/password login and HTTP basic auth are disabled. The only way to access Grafana is through the auth proxy.
https://<pod>-8889.<proxy-base>/?token=<JUPYTER_PASSWORD>- Setup: Ensure the pod has the
Update a Runpod template README via update-template-readme.sh
mainUse the
update-template-readme.shscript to push updates to a Runpod template's README content using the Runpod API.Requirements:
- The
RUNPOD_API_KEYenvironment variable must be set with a valid API key. - Node.js must be installed (used for JSON escaping).
- A
README.mdfile must exist within the provided template path.
Parameters:
template_id: The unique Runpod template ID to update.template_path: The local filesystem path to the template directory containing theREADME.mdfile.
# Update the PyTorch template README ./update-template-readme.sh abc123 official-templates/pytorch # Update the ComfyUI template README ./update-template-readme.sh def456 official-templates/stable-diffusion-comfyui- The
Build the NVIDIA PyTorch template
mainYou can build the NVIDIA PyTorch template using the provided
bake.shscript. Run the following command from the repository root to initiate the build process for this specific template../bake.sh nvidia-pytorchVerify Runpod container image signatures
mainRunpod uses keyless signing via Cosign and Sigstore. To ensure the integrity of a container image, you must verify its signature against the GitHub OIDC identity used during the build process.
Prerequisites:
cosignversion 2.0 or higher.- A tool to resolve image tags to digests (e.g.,
docker buildxorcrane).
Verification Workflow:
- Resolve the tag to a digest: Always verify the immutable
sha256digest rather than a mutable tag. - Run
cosign verify: Use the--certificate-identity-regexpto match the GitHub workflow URI and--certificate-oidc-issuerto specify the GitHub OIDC provider.
Standard Verification Command:
IMAGE="docker.io/runpod/base:1.0.7-ubuntu2204" # 1. Resolve the tag to its immutable digest DIGEST=$(docker buildx imagetools inspect "${IMAGE}" | awk '/^Digest:/ {print $2; exit}') # 2. Verify the signature cosign verify \ --certificate-identity-regexp "^https://github.com/runpod/containers/\.github/workflows/.+" \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ "docker.io/runpod/base@${DIGEST}"IMAGE="docker.io/runpod/base:1.0.7-ubuntu2204" # 1. Resolve the tag to its immutable digest. DIGEST=$(docker buildx imagetools inspect "${IMAGE}" \ | awk '/^Digest:/ {print $2; exit}') echo "Digest: ${DIGEST}" # 2. Verify the signature against the GitHub OIDC identity that signed it. cosign verify \ --certificate-identity-regexp "^https://github.com/runpod/containers/\.github/workflows/.+" \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ "docker.io/runpod/base@${DIGEST}"