I tried following this tutorial:
in order to run an opengl program inside docker on a jetson TX2.
glmark2 however gives back an error:
root@e78d38e1e237:/# glmark2 No protocol specified Error: main: Could not initialize canvas
I found this entry in the forum:
where a similar problem was apparently caused by running it inside wayland. Well I checked
echo $XDG_SESSION_TYPE x11
but that does not seem to be the problem with me.
I tried different values for the $DISPLAY variable. ‘:1’, ':0
, ‘0:0’ all gave the same error message.
Also I tried running
glxgears from the package
mesa-utils to verify gpu access. The error here is:
Error: couldn't open display followed by the value of the $DISPLAY variable.
glmark2 work fine on the actual system. There needs to be a problem with how the docker container communicates with the X11-server.
The used files and commands should be as they are descibed in the tutorial but I include the files as text here in case the link dies or I made a mistake copying.
RUN apt-get update
&& apt-get install -y -qq --no-install-recommends
&& rm -rf /var/lib/apt/lists/*# Env vars for the nvidia-container-runtime.
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute