3D Slicer customized application with display and GPU on different hosts

Others have written a very nice lung-air app customization of 3D Slicer that makes use of a GPU. I have a display-less Ubuntu 20.04 workstation with a good GPU and an Ubuntu 20.04 laptop with a display but a poor GPU. I wish to have the computations done on the workstation, but have the interface showing up on my laptop display. What’s the best practice for this for Ubuntu systems?

I have tried using an xterm on my laptop, ssh’ing to the workstation, and launching the application – and that does give me the display on my laptop via X11 forwarding, but the graphics are slow. I’ve searched the web and found some postings about using a “software renderer” but that appears to be for Windows, not Ubuntu. (Aside: I find those instructions to be confusing: which is the “renderer” computer, the one with the GPU or the one with the display, where I would follow the recommended steps?)

What’s the best practice for this? Thanks!

1 Like

This can be done quite readily (and freely) using VirtualGL and TurboVNC:

  1. On your headless (or displayless) Ubuntu 20.04 with GPU, you will install VirtualGL (this assumes you already have the GPU drivers installed on the Ubuntu host, if not you should start with that)
  2. After install vgl, run /opt/VirtualGL/bin/vglserver_config, and follow the instructions.
  3. Install TurboVNC on the same Ubuntu on host
  4. Install TurboVNC on your laptop.

Then open the TurboVNC client on your laptop and connect to your Ubuntu host as if you are using a ssh session (e.g., user@your.ubuntu.server). You would authenticate via the ssh password you normally use connecting to that host. After that you would see a unity desktop, and from there launch your Slicer application via command vglrun. So if your slicer path is something like $HOME/Downloads/Slicer/Slicer, you would do
vglrun $HOME/Downloads/Slicer/Slicer

1 Like

Hi @Lee_Newberg -

I have good luck with x11vnc/noVNC and then tunneling the vnc connection through ssh.
It’s the method describe here. The scripts to configure a vanilla ubuntu machine are here.

1 Like

If your GPU computer needs to serve multiple users or you want to maximize the responsiveness of the GUI then you may consider running Slicer locally (on your laptop) and setting up a MONAILabel server (or some generic Python REST API server using FastAPI, Flask, etc.) to perform the tasks that require GPU.