File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,11 @@ Refer to the [nvidia-container-runtime](https://github.com/NVIDIA/nvidia-contain
36
36
# ## Command line example
37
37
38
38
` ` ` bash
39
- # Setup a rootfs based on Ubuntu 16.04 inside new namespaces
39
+ # Setup a new set of namespaces
40
40
cd $( mktemp -d) && mkdir rootfs
41
41
sudo unshare --mount --pid --fork
42
+
43
+ # Setup a rootfs based on Ubuntu 16.04 inside the new namespaces
42
44
curl http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04-core-amd64.tar.gz | tar -C rootfs -xz
43
45
useradd -R $( realpath rootfs) -U -u 1000 -s /bin/bash nvidia
44
46
mount --bind rootfs rootfs
@@ -52,7 +54,7 @@ mount -t tmpfs none tmp
52
54
mount -t tmpfs none run
53
55
54
56
# 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 )
56
58
57
59
# Change into the new rootfs
58
60
pivot_root . mnt
You can’t perform that action at this time.
0 commit comments