GPU Containers
Primary Actions
- Configure NVIDIA CUDA or AMD ROCm container runtime access.
- Select compatible CUDA/ROCm base images for framework workloads.
- Configure single- and multi-GPU container execution.
- Configure Docker Compose GPU services.
- Troubleshoot driver/runtime/framework compatibility failures.
Quick Checks
# Host visibility
nvidia-smi
# NVIDIA container GPU check
docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi
# AMD ROCm container check
docker run --rm --device=/dev/kfd --device=/dev/dri rocm/pytorch:latest rocm-smi
Compatibility Snapshot
| CUDA Version | Minimum Driver |
|-------------|----------------|
| 12.4 | 550.54+ |
| 12.1 | 530.30+ |
| 11.8 | 520.61+ |
End-to-End Workflow With Validation Gates
- Check host GPU driver/tooling.
- Install/configure container runtime toolkit.
- Validate GPU visibility in a base container.
- Build app image and validate framework GPU access.
- For multi-GPU jobs, validate allocation and IPC/shared memory settings.
- If any gate fails, fix compatibility/runtime config and retry from step 1.
Quick Compose Example (NVIDIA)
services:
training:
build: .
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
Templates
Deep References
- NVIDIA CUDA setup and compatibility:
references/nvidia-cuda-setup.md
- AMD ROCm setup and device mapping:
- Validation workflow and failure recovery: