The following works.
$ xhost +
$ sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-base:r32.3.1
$ apt-get update && apt-get install -y --no-install-recommends make g++
$ /usr/local/cuda-10.0/bin/cuda-install-samples-10.0.sh /tmp
$ cd /tmp/NVIDIA_CUDA-10.0_Samples/2_Graphics/simpleGL
$ make
$ ./simpleGL
But if I omit --net=host
then it does not work. Why is --net=host
required?
In my application, that’s not the network I want to use. My container uses a different network (not host
). Is there a way I can manually accomplish the same thing with a la carte options without specifying --net=host
? Is there some set of equivalent -v
mappings that I can do that will accomplish the same thing?