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)
root@710a34bae4dd:/usr/local/cuda-10.0/samples/2_Graphics/simpleGL#

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 nvcr.io/nvidia/l4t-base:r32.3.1 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.

Regards,

Hi,

We just confirm that simleGL can work within nvcr.io/nvidia/l4t-base:r32.3.1 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 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

Thanks.

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?

Hi,

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.

Thank.s

1 Like