Closed duongnb09 closed 2 years ago
TurboVNC needs a window manager. If you're looking for a lightweight one, install Xfce in your container and set $wm = "xfce";
in /etc/turbovncserver.conf.
TurboVNC needs a window manager. If you're looking for a lightweight one, install Xfce in your container and set
$wm = "xfce";
in /etc/turbovncserver.conf.
Thanks @dcommander for the instruction! I've installed Xfce and configed $wm to "xfce". The TurboVNC server seems working based on the log, but VirtualGL with EGL still cannot be run due to the missing 2D X server. In other thread Access the GPU without going through an X server, you said that we can use TurboVNC Server as 2D X server. How to make TurboVNC as 2D X server here?
Here is the log of TurboVNC
Here is the output of VirtualGL
You are confusing the terms. TurboVNC is always the 2D X server. The EGL back end in VirtualGL eliminates the need for a 3D X server. Using VirtuaGL in a Docker container requires nvidia-docker. See https://github.com/dcommander/virtualgl_docker_examples for examples, but note that those Dockerfiles try to pull the 3.0 evolving build of VGL, which no longer exists. They should be updated to use the latest official 3.0.x release (3.0.1 as of this writing.)
You are confusing the terms. TurboVNC is always the 2D X server. The EGL back end in VirtualGL eliminates the need for a 3D X server. Using VirtuaGL in a Docker container requires nvidia-docker. See https://github.com/dcommander/virtualgl_docker_examples for examples, but note that those Dockerfiles try to pull the 3.0 evolving build of VGL, which no longer exists. They should be updated to use the latest official 3.0.x release (3.0.1 as of this writing.)
@dcommander Ok, so my Docker container already had nvidia-docker. The confusing part here is how to make TurboVNC working with VirtualGL. Based on your instructions, we first need to run /opt/TurboVNC/bin/vncserver
to create a 2D X server (i.e. a virtual display), then use VirtualGL to run an OpenGL app (e.g. glxspheres64) with EGL back end. I think the issue here is that I can run TurboVNC with the vncserver command, but VirtualGL doesn't pick up the display which is created by TurboVNC. Most tutorials mentioned using TurboVNC viewer/client (in another machine) to run VirtualGL. I guess using the viewer/client is one way to force VirtualGL to use the virtual display from TurborVNC server, but I just want to run the graphic app in the container itself, so there is no need for the viewer/client to be involved here
What do you mean by “VirtualGL doesn’t pick up the display”? VirtualGL uses the X server pointed to by the DISPLAY
environment variable as a 2D X server. I also don’t understand your statement about the viewer/client. Are you saying that this is a headless application whereby you don’t ever need to see the graphical output? If so, then you don’t need TurboVNC. You could use Xvfb instead. However, you would still need to get VirtualGL working in order to have GPU acceleration.
@duongnb09 Please answer the questions.
Hi,
I'm trying to run TurboVNC 3.0.1 server with the command
/opt/TurboVNC/bin/vncserver
in a headless docker container, but I kept getting the error messagexstartup.turbovnc: TWM not found. I give up.
and the vncserver doesn't seem working. Any ideas on why this happened?