1. System Requirements
Confirm your hardware meets the minimum requirements. Follow the instructions based on your GPU type.
Tip: Ensure your OS and GPU drivers are up to date.
# Check NVIDIA drivers and CUDA toolkit
nvidia-smi
nvcc --version
- NVIDIA Driver ≥ 450.80.02
- CUDA Toolkit ≥ 11.0
# Verify GPU details
lspci | grep -i vga
glxinfo | grep "OpenGL version"
- Up-to-date GPU drivers
- Vulkan/Mesa support enabled
2. Docker Installation
Confirm Docker is installed and updated. This step ensures your container runtime is ready.
# Check Docker version
docker --version
If Docker is not installed, please follow the official Docker installation guide.
3. Docker Configuration
Configure Docker for GPU support. Follow the instructions for your selected GPU type.
# Install NVIDIA Container Toolkit
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
# Install Mesa Utils for GPU access
sudo apt-get install -y mesa-utils
sudo usermod -aG video $USER
4. NGC API Key Generation & Usage
For NVIDIA users, generate an API key from your NGC account:
To generate your API key:
- Log in to your NGC account at ngc.nvidia.com.
- Go to your account settings and find the API Key section.
- Click Generate API Key and copy the key provided.
Using your API key: First, set your API key as an environment variable, then log in using it.
# Set your NGC API key as an environment variable
export NGC_API_KEY=
# Log in to the NVIDIA container registry using your API key
docker login nvcr.io -u '$oauthtoken' -p $NGC_API_KEY
5. Container Setup & Pulling NGC Packages
For NVIDIA users, pull specific NGC packages (e.g., TensorRT). For Non‑NVIDIA users, pull a generic base image.
# Pull a specific NGC package (e.g., TensorRT)
docker pull nvcr.io/nvidia/tensorrt:21.06-py3
# Pull a base image from Docker Hub
docker pull ubuntu:latest
# Run a container with GPU access
docker run -it --device=/dev/dri:/dev/dri [IMAGE] [COMMAND]
6. Verification
Confirm the container can communicate with the GPU.
# Run NVIDIA verification
docker run --gpus all nvidia/cuda:11.0-base nvidia-smi
# Run OpenCL verification
docker run --device=/dev/dri ubuntu clinfo
7. Troubleshooting
Review common issues and apply fixes if needed.
- Verify Docker service is running
- Check firewall settings if image pull fails
- Confirm GPU drivers are correctly installed
# Restart Docker if needed
sudo systemctl restart docker
8. Final Review & Cleanup
Review the installation and run cleanup commands to free resources.
# Clean up unused Docker resources
docker system prune -f
docker image ls
docker container ls -a
- All components are verified
- System is ready for production use