项目作者: tyson-swetnam

项目描述 :
XPRA desktop with QGIS, GRASS, SAGA-GIS
高级语言: Dockerfile
项目地址: git://github.com/tyson-swetnam/qgis-xpra.git
创建时间: 2019-11-03T22:11:07Z
项目社区:https://github.com/tyson-swetnam/qgis-xpra

开源协议:GNU General Public License v3.0

下载


qgis-xpra

Ubuntu container with Xpra for running remote desktop applications in browser.

  1. 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.

  1. 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

  1. singularity build qgis-xpra-focal.sif docker://harbor.cyverse.org/vice/xpra/cudagl:geospatial-20.04

Pull the container from Singularity Library

  1. 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

  1. singularity run --nv qgis-xpra-focal.sif

Run the Singularity container with NVIDIA locally

  1. singularity run --nv qgis-xpra-focal.sif qgis

Run the Singularity container locally w/o GPU

  1. 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

  1. Section "DRI"
  2. Mode 0666
  3. EndSection

Check the correct BusID in the Device part

  1. Section "Device"
  2. Identifier "Device0"
  3. Driver "nvidia"
  4. VendorName "NVIDIA Corporation"
  5. BusID "PCI:0:3:0"
  6. EndSection

Remove the option in the display part:

  1. 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

  1. ### Check OpenGL:

glxinfo | grep OpenGL
```

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