diff --git a/container-toolkit/install-guide.md b/container-toolkit/install-guide.md index 10f12488f..2501696c3 100644 --- a/container-toolkit/install-guide.md +++ b/container-toolkit/install-guide.md @@ -120,6 +120,45 @@ backlinks: none $ sudo systemctl restart docker ``` +#### Rootless mode + +To configure the container runtime for Docker running in [Rootless mode](https://docs.docker.com/engine/security/rootless/), +follow these steps: + +1. Configure the container runtime by using the `nvidia-ctk` command: + + ```console + $ nvidia-ctk runtime configure --runtime=docker --config=$HOME/.config/docker/daemon.json + ``` + +2. Restart the Rootless Docker daemon: + + ```console + $ systemctl --user restart docker + ``` + +3. Open `/etc/nvidia-container-runtime/config.toml` in an editor, as the root: + + ```console + $ sudo vi /etc/nvidia/container-runtime/config.toml + ``` + +4. Apply the following change: + + ```diff + --- /etc/nvidia-container-runtime/config.toml.BAK 2024-01-16 07:02:05.606573439 +0000 + +++ /etc/nvidia-container-runtime/config.toml 2024-01-16 07:02:11.114549694 +0000 + @@ -10,7 +10,7 @@ + #ldcache = "/etc/ld.so.cache" + ldconfig = "@/sbin/ldconfig.real" + load-kmods = true + -#no-cgroups = false + +no-cgroups = true + #path = "/usr/bin/nvidia-container-cli" + #root = "/run/nvidia/driver" + #user = "root:video" + ``` + ### Configuring containerd 1. Configure the container runtime by using the `nvidia-ctk` command: