Skip to content

Commit

Permalink
container-toolkit/install-guide.md: add Rootless Docker
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Jan 18, 2024
1 parent 584dbda commit 0ef061a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions container-toolkit/install-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0ef061a

Please sign in to comment.