Skip to content

tyson-swetnam/qgis-xpra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qgis-xpra

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

Run with NVIDIA GPU

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

Run with Singularity

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

Setting up headless NVIDIA GPU Rendering

Nvidia-headless

This is a small guide to have NVIDIA accelerated OpenGL support for nvidia-docker2 on a HEADLESS Ubuntu 18.04/20.04 server.

Prereqs. for the system

sudo apt-get install xinit xserver-xorg-legacy mesa-utils xterm

Stop gdm3 Window Manager

sudo service gdm3 stop

Maybe also stop lightdm

sudo service lightdm stop

Edit xinit permissions

sudo sed -i -e "s/console/anybody/" /etc/X11/Xwrapper.config

Check PCI BusID

nvidia-xconfig --query-gpu-info

Create xorg.conf with the correct BusID fromt he previus command

sudo nvidia-xconfig --enable-all-gpus --use-display-device=none -o /etc/X11/xorg.conf --busid=PCI:X:Y:Z

Edit /etc/X11/xorg.conf and add the following at the top

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"

Start an X Server

export DISPLAY=:0

xinit &

This should return you back to the CLI, if it holds the terminal it might be errored.

Test that it is working:

Check if Xorg is using nvidia driver under processes

nvidia-smi

Check OpenGL:

glxinfo | grep OpenGL

If everything is ok there should be something with "NVIDIA OpenGL EGL"

Releases

No releases published

Packages

No packages published