The NVIDIA Container Toolkit is a set of utilities and libraries provided by NVIDIA to enable containers to use and share NVIDIA GPU resources. The toolkit is container agnostic, supporting several common container runtimes including Docker and Podman.
It appears to present GPU/CUDA features to software running within containers on the host with the NVIDIA GPU. The supported platforms seem to be specifically GNU/Linux distributions (Debian, Ubuntu, Centos, Fedora, Open Suse, and Amazon’s Amazon Linux AMIs) on typical amd64, arm64/aarch64 hardware.

NVIDIA GPU Operator #
This piece extends container runtimes to connect GPU containers to NVIDIA devices on a compatible host. This connection is done in a managed way by NVIDIA middleware rather than direct device pass-through or other ad-hoc runtime-specific ways. It also enables more automated management and provisioning of GPU containers in larger container orchestration clusters.
Installation #
Ensure that the system is equipped with NVIDIA GPU hardware and that the appropriate drivers have been installed in the host OS.
Similar procedures are available for yum
/zypper
package-based systems at Installing the NVIDIA Container Toolkit Docs, but Debian/Ubuntu examples are displayed here.
Setup apt Repository #
|
|
Install with apt #
|
|
Be aware that these NVIDIA tools need HTTP access for the installation and configuration of a host to download appropriate container images, libraries, and drivers.
Configuration for Docker #
Use nvidia-ctk
utility
#
The nvidia-ctk
command will add some settings to the Docker daemon’s config file, so after configuring the runtime, the Docker daemon needs to be restarted. The command just requires specifying the appropriate container runtime, and then it knows what and how to do the configuration.
|
|
Check the Installation and Configuration #
Check that everything is configured correctly and that the GPU device is available to the container with this command:
|
|
This should identify the host’s NVIDIA device(s) details and system drivers without any issues. In this case, it finds the test system’s (older) GeForce GTX 1060 3GB correctly.