ai-lab icon indicating copy to clipboard operation
ai-lab copied to clipboard

How to render with GPUs in VNC Desktop

Open oldraincoat opened this issue 4 years ago • 2 comments

Thanks for sharing the code I am running the container on a remote host and I want to display the window of glxspheres64 with virtualgl on GPUs. I start the docker container with: nvidia-docker run -d -p 8888:8888 -v /home/$USER/work/work1:/home/jovyan -e JUPYTER_ENABLE_LAB=yes nvaitc/ai-lab:19.09-vnc And I start the vnc desktop and run the following command: /opt/Turbovnc/bin/vncserver :5 vglrun -d :5.0 ./glxspheres64 But the result shown in the figure illustrates that opengl renderer is llvmpipe, not GPUs. github How can I render with GPUs and display the window. Thank you.

oldraincoat avatar Dec 14 '19 06:12 oldraincoat

Apologies for the delay, I have updated the FAQ with more detailed instructions. Here's the gist of it:

xhost +local:root
nvidia-docker --rm run \
 -e "DISPLAY" \
 -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
 -p 8888:8888 \
 -v /home/$USER:/home/jovyan \
 nvaitc/ai-lab:20.03-vnc

tlkh avatar Mar 31 '20 04:03 tlkh

Hi, this is the error I am getting.

Screen Shot 2021-11-21 at 3 15 35 AM

Do you have any idea what I'm doing wrong?

I am trying to run this from a headless server, and when I run xhost +local:root I get this error:

➜  ~ xhost +local:root
xhost:  unable to open display ""

johncadengo avatar Nov 21 '21 11:11 johncadengo