3.5 NVIDIA Container Toolkit

NCP-AII · Control Plane Installation and Configuration (19% of the exam) · Official objective: “Install the NVIDIA container toolkit.”

Installing the toolkit and pointing Docker or containerd at the NVIDIA runtime.

Key points

  1. 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”

    — NVIDIA Container Toolkit: Installation Guide

    “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.”

    — NVIDIA Container Toolkit: Installation Guide

    “Restart the Docker daemon: $ sudo systemctl restart docker”

    — NVIDIA Container Toolkit: Installation Guide

  2. 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 Container Toolkit: Installation Guide

    “NVIDIA recommends installing the driver by using the package manager for your distribution.”

    — NVIDIA Container Toolkit: Installation Guide

Key terms

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”

— NVIDIA Container Toolkit: Installation Guide

“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.”

— NVIDIA Container Toolkit: Installation Guide

“Restart the Docker daemon: $ sudo systemctl restart docker”

— NVIDIA Container Toolkit: Installation Guide

Practice 3.5 (2 questions) Full Control Plane Installation and Configuration guide

← 3.4 GPU and DOCA drivers · 3.6 GPUs with Docker →