3.5 NVIDIA Container Toolkit
Installing the toolkit and pointing Docker or containerd at the NVIDIA runtime.
Key points
The NVIDIA Container Toolkit lets containers use NVIDIA GPUs. 'nvidia-ctk runtime configure' updates /etc/docker/daemon.json so Docker can use the NVIDIA Container Runtime. Then you restart the Docker daemon.
What NVIDIA says (3)
“sudo nvidia-ctk runtime configure --runtime = docker”
“The nvidia-ctk command modifies the /etc/docker/daemon.json file on the host. The file is updated so that Docker can use the NVIDIA Container Runtime.”
“Restart the Docker daemon: $ sudo systemctl restart docker”
The NVIDIA Container Toolkit lets containers use the host's GPUs. It relies on the host driver. NVIDIA lists installing the driver as a prerequisite and recommends the package manager.
What NVIDIA says (2)
“Install the NVIDIA GPU driver for your Linux distribution.”
“NVIDIA recommends installing the driver by using the package manager for your distribution.”
Key terms
- NVIDIA Container Toolkit: The software that lets containers use the host GPUs; nvidia-ctk configures Docker or containerd for it.
Sample question
You installed the NVIDIA Container Toolkit. What configures Docker to use the NVIDIA runtime?
Show the answer
Answer: sudo nvidia-ctk runtime configure --runtime=docker, then restart Docker.
The NVIDIA Container Toolkit lets containers use NVIDIA GPUs. 'nvidia-ctk runtime configure' updates /etc/docker/daemon.json so Docker can use the NVIDIA Container Runtime. Then you restart the Docker daemon.
What NVIDIA says (3)
“sudo nvidia-ctk runtime configure --runtime = docker”
“The nvidia-ctk command modifies the /etc/docker/daemon.json file on the host. The file is updated so that Docker can use the NVIDIA Container Runtime.”
“Restart the Docker daemon: $ sudo systemctl restart docker”
Practice 3.5 (2 questions) Full Control Plane Installation and Configuration guide