The NVIDIA Container Toolkit is the software layer that lets Docker, containerd, or CRI-O containers access a host's GPUs, injecting the correct driver libraries and device nodes into a container at runtime so a containerized application can call CUDA without the GPU driver being installed inside the image itself. You need it because containers are otherwise isolated from host hardware, and without this toolkit a container has no way to see or use a GPU no matter how much CUDA code sits inside it. The toolkit works by registering a runtime hook that container engines call before starting a container, which then mounts the necessary driver libraries, sets up device files, and exposes GPU capabilities requested through environment variables. This separation is what allows a single host driver version to serve containers built against different CUDA toolkit versions, since only the driver, not the full CUDA stack, needs to live on the host. On Kubernetes, the NVIDIA GPU Operator installs and manages this toolkit automatically as part of its broader stack. Nanobase AI, headquartered in Silicon Valley, configures the Container Toolkit correctly on every GPU node it provisions, whether running standalone Docker or Kubernetes.

How the runtime hook actually works

A container engine normally isolates a container completely from host hardware, which means a containerized application has no way to see or use a GPU no matter how much CUDA code sits inside its image. The Container Toolkit solves this by registering a runtime hook that the container engine calls just before starting a container: the hook inspects which GPU capabilities and devices the container requested, then mounts the host's driver libraries and device files into the container's filesystem and injects the corresponding environment variables, all before the container's own entrypoint runs.

This separation, where only the driver lives on the host and the full CUDA toolkit lives inside each container image, is what lets one host driver version serve containers built against different CUDA toolkit versions simultaneously, since each container brings its own compatible CUDA runtime rather than depending on a host-installed one.

Configuring it across container runtimes

RuntimeConfiguration approach
DockerToolkit installs a runtime class; specify --gpus flag or set as default runtime in daemon config
containerdToolkit configures a runtime handler referenced in containerd's config file
CRI-OToolkit registers an OCI runtime hook consumed through CRI-O's runtime configuration
Kubernetes (via any of the above)The GPU Operator manages this configuration automatically as part of its broader install

Regardless of which runtime is in play, the underlying mechanism is the same: the toolkit registers itself as the hook or runtime class that fires before a container starts, so verifying that registration is the first step whenever GPU access fails.

Common misconfigurations and their symptoms

A container that cannot see any GPU despite the toolkit being installed usually means the container engine's default runtime was never actually switched to the NVIDIA-aware runtime, so the hook simply never fires for that container. A container that sees a GPU but fails on driver library version mismatches, particularly common right after a driver upgrade, usually means the toolkit's cached configuration was not refreshed to point at the new driver library paths. On Kubernetes specifically, a device plugin reporting GPUs as allocatable while workload pods still fail to access them often traces back to the toolkit's runtime hook not being registered correctly in containerd's configuration, a gap the GPU Operator normally closes automatically but that manual installs can miss. Each of these symptoms traces back to a configuration or state mismatch rather than a toolkit defect, which is why checking the actual runtime registration first resolves most GPU-invisible-to-container issues.

Its place within the broader GPU Operator stack

On Kubernetes, the NVIDIA GPU Operator installs and manages the Container Toolkit automatically as one of several components alongside the driver, device plugin, and dcgm-exporter, so most Kubernetes users never configure it directly. Understanding what the toolkit does on its own is still valuable even inside a GPU Operator deployment, since diagnosing a container that cannot see a GPU requires knowing whether the failure sits at the toolkit's runtime hook layer or somewhere else in the operator's broader chain.

Frequently asked questions

Is the NVIDIA Container Toolkit the same as the old nvidia-docker project?

The Container Toolkit is the modern successor to the original nvidia-docker wrapper, integrating directly with standard container runtimes through the OCI runtime hook mechanism rather than requiring a separate Docker wrapper binary. This means existing Docker Compose files, CI pipelines, and orchestration configs built around nvidia-docker's older interface typically need only minor updates to work with the current toolkit.

Do I need the Container Toolkit if I'm not using Kubernetes?

Yes, if you are running GPU workloads in any container, whether through plain Docker, containerd, or another runtime, since the isolation problem it solves exists regardless of orchestration layer. Without it, a container engine has no built-in way to expose host GPU drivers to a container, so the toolkit is required whether you orchestrate with Kubernetes, Docker Swarm, or nothing more than manual docker run commands.

Does the Container Toolkit need to match the CUDA version inside my container images?

No, its job is independent of any specific CUDA version; it exposes the host driver to containers, and each container's own CUDA runtime version just needs to be compatible with that host driver, not with the toolkit itself. In practice this means a single host driver version can serve containers built against several different CUDA toolkit releases at once, as long as each stays within that driver's supported compatibility range.

What is the quickest way to verify the toolkit is working?

Run a container based on an NVIDIA CUDA base image and execute nvidia-smi inside it; if the GPU list and driver version appear correctly, the toolkit's runtime hook is functioning as expected. This single command exercises the entire injection path end to end, so a failure at this step points directly at the runtime configuration rather than at the application code itself.

How Nanobase AI helps

Nanobase AI, headquartered in Silicon Valley, configures the Container Toolkit correctly on every GPU node it provisions, whether running standalone Docker or a full Kubernetes deployment through the GPU Operator. For the operator that manages this automatically at scale, see what is the NVIDIA GPU Operator.

Ready to discuss your project? Contact Nanobase AI or email hello@bumu.tech.