Skip to content

Commit dded84d

Browse files
klueskaRenaudWasTaken
authored andcommitted
Update README with working example
1 parent 773b195 commit dded84d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ Refer to the [nvidia-container-runtime](https://github.com/NVIDIA/nvidia-contain
3636
### Command line example
3737

3838
```bash
39-
# Setup a rootfs based on Ubuntu 16.04 inside new namespaces
39+
# Setup a new set of namespaces
4040
cd $(mktemp -d) && mkdir rootfs
4141
sudo unshare --mount --pid --fork
42+
43+
# Setup a rootfs based on Ubuntu 16.04 inside the new namespaces
4244
curl http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-amd64.tar.gz | tar -C rootfs -xz
4345
useradd -R $(realpath rootfs) -U -u 1000 -s /bin/bash nvidia
4446
mount --bind rootfs rootfs
@@ -52,7 +54,7 @@ mount -t tmpfs none tmp
5254
mount -t tmpfs none run
5355
5456
# Isolate the first GPU device along with basic utilities
55-
nvidia-container-cli --load-kmods configure --no-cgroups --utility --device 0 .
57+
nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --no-cgroups --utility --device 0 $(pwd)
5658
5759
# Change into the new rootfs
5860
pivot_root . mnt

0 commit comments

Comments
 (0)