Ubuntu container with Xpra for running remote desktop applications in browser.
docker run -it -p 9876:9876 harbor.cyverse.org/vice/xpra/desktop:geospatial-20.04
Image is built from NVIDIA CUDA GL Docker image and is compatible with NVIDIA GPUs - need to install additional software.
docker run -it --gpus all -p 9876:9876 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY -e XAUTHORITY -e NVIDIA_DRIVER_CAPABILITIES=all harbor.cyverse.org/vice/xpra/cudagl:geospatial-20.04
Build the container from a Docker image
singularity build qgis-xpra-focal.sif docker://harbor.cyverse.org/vice/xpra/cudagl:geospatial-20.04
Pull the container from Singularity Library
singularity pull library://tyson-swetnam/default/qgis-xpra-focal:latest
Run the Singualarity container on GPU with its own XPRA Desktop running on port :9876
singularity run --nv qgis-xpra-focal.sif
Run the Singularity container with NVIDIA locally
singularity run --nv qgis-xpra-focal.sif qgis
Run the Singularity container locally w/o GPU
singularity run qgis-xpra-focal.sif qgis
This is a small guide to have NVIDIA accelerated OpenGL support for nvidia-docker2 on a HEADLESS Ubuntu 18.04/20.04 server.
sudo apt-get install xinit xserver-xorg-legacy mesa-utils xterm
sudo service gdm3 stop
sudo service lightdm stop
sudo sed -i -e "s/console/anybody/" /etc/X11/Xwrapper.config
nvidia-xconfig --query-gpu-info
sudo nvidia-xconfig --enable-all-gpus --use-display-device=none -o /etc/X11/xorg.conf --busid=PCI:X:Y:Z
Section "DRI"
Mode 0666
EndSection
Check the correct BusID in the Device part
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:0:3:0"
EndSection
Remove the option in the display part:
Option "UseDisplayDevice" "none"
export DISPLAY=:0
xinit &
This should return you back to the CLI, if it holds the terminal it might be errored.
Check if Xorg is using nvidia driver under processes
nvidia-smi
glxinfo | grep OpenGL
If everything is ok there should be something with "NVIDIA OpenGL EGL"