Docker hub: damanikjosh/virtualgl-turbovnc-ros2
This image is based on the nvidia/opengl image and adds VirtualGL, TurboVNC, noVNC, and ROS2 to it. It is intended to be used as a base image for running graphical ROS2 applications in a Docker container, such as rviz2 and Gazebo.
latest
,iron
: Ubuntu 22.04 with VirtualGL 3.1, TurboVNC 3.1, andros-iron-desktop
humble
: Ubuntu 22.04 with VirtualGL 3.1, TurboVNC 3.1, andros-humble-desktop
galactic
: Ubuntu 20.04 with VirtualGL 3.1, TurboVNC 3.1, andros-galactic-desktop
foxy
: Ubuntu 20.04 with VirtualGL 3.1, TurboVNC 3.1, andros-foxy-desktop
Before you can use this image, you need to install VirtualGL server on the host system. You can follow the instructions here.
You can use this image to run graphical applications in a Docker container. You can use the vglrun
command to run the graphical applications.
docker run --gpus all --rm -it --network=host -e DISPLAY=:1 damanikjosh/virtualgl-turbovnc-ros2:latest vglrun rviz2
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
xauth: file /root/.Xauthority does not exist
Desktop 'TurboVNC: joshua-ki:1 ()' started on display joshua-ki:1
Starting applications specified in /opt/TurboVNC/bin/xstartup.turbovnc
Log file is /root/.vnc/joshua-ki:1.log
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[INFO] [1709704394.934937411] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1709704394.935011617] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[INFO] [1709704394.972560374] [rviz2]: Stereo is NOT SUPPORTED
You can customize the container using the following environment variables:
DISPLAY
: The display number to use for VNC. Default is:10
.VGL_DISPLAY
: The display number to use for VirtualGL. Default is:0
.VNC_PASSWORD
: The password for the VNC server. If not set, you will be prompted to enter a password when you run the container.VNC_RESOLUTION
: The resolution of the VNC server. Default is1280x800
.NOVNC_PORT
: The port on which the noVNC server will listen. Default is8080
.
To access the VNC server, you can use a VNC client to connect to localhost:$((5900 + DISPLAY))
. You can also use a web browser to access the noVNC server at http://localhost:${NOVNC_PORT}
.
This image is licensed under the MIT License.