OpenGL apps can't run in docker conttainer on Jetson Nano

Can OpenGL apps run in docker container on Jetson Nano?

I try to run /usr/local/cuda-10.0/samples/2_Graphics/simpleGL/simpleGL but segmentation fault happens as follows

root@710a34bae4dd:/usr/local/cuda-10.0/samples/2_Graphics/simpleGL# ./simpleGL
simpleGL (VBO) starting…

GPU Device 0: “NVIDIA Tegra X1” with compute capability 5.3

Segmentation fault (core dumped)

I set up my Jetson Nano according to standard way with nv-jetson-nano-sd-card-image-r32.3.1 and use docker engine installed in the image.

I use as base image for docker container.

I think that OpenGL app can run in docker by setting valid options (directory, device and so on) for run command.
I hope to know them.



We just confirm that simleGL can work within container.
Please follow these steps:

$ xhost +
 $ sudo docker run -it --rm --net=host --runtime nvidia  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix
$  apt-get update && apt-get install -y --no-install-recommends make g++
$ /usr/local/cuda-10.0/bin/ /tmp
$ cd /tmp/NVIDIA_CUDA-10.0_Samples/2_Graphics/simpleGL
$ make
$ ./simpleGL


Thank you!
I succeeded to run OpenGL app in Docker according for your comment.
It seems that difference point between this options and my options is just only ‘–net=host’.
Why is this option needed to run OpenGL apps?


Here is information for your reference:

The key point is that you will need to use host display for the openGL sample.
So you will need to enable the access when launching the container.


1 Like