Difference between revisions of "GUI Programs"

From UFRC
Jump to navigation Jump to search
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Software]][[Category:GUI]]
 
[[Category:Software]][[Category:GUI]]
 
__TOC__
 
__TOC__
Here you will find the information necessary to configure and run graphical user interface (GUI) applications on HiPerGator. The process is not complicated, but running a GUI on a remote server and displaying the windows on your local client computer with a sufficiently responsive interface is not as easy as simply running the application locally. To accomplish this task we use [https://xpra.org Xpra software] - an open-source multi-platform persistent remote display server and client for forwarding application and desktop screens. Full information on Xpra can be found in its [https://xpra.org/trac/wiki/Usage basic usage documentation] and the [https://xpra.org/manual.html Xpra manual]. Below we show the parts of Xpra documentation relevant to running GUI Programs on HiPerGator.
+
Here you will find the information necessary to configure and run graphical user interface (GUI) applications on HiPerGator. The process is not complicated, but running a GUI on a remote server and displaying the windows on your local client computer with a sufficiently responsive interface is not as easy as simply running the application locally. We'd like to acknowledge an Open Source [https://xpra.org Xpra Project] for creating software we built our GUI sessions on top of.
  
<span style="color:red">'''Servers in the SLURM gui partition are accessible only within the UF campus network.'''</span>
+
{{Note|Open on Demand is only accessible from the UF network. Use the [https://vpn.ufl.edu VPN] if off campus.|warn}}
  
 
If you are working off campus, you will need to use the VPN to connect to the UF campus network using [https://connect.ufl.edu/it/wiki/Pages/glvpn-anyconnect-install.aspx AnyConnect VPN] or similar software. Please see: [https://vpn.ufl.edu https://vpn.ufl.edu] for additional information.
 
If you are working off campus, you will need to use the VPN to connect to the UF campus network using [https://connect.ufl.edu/it/wiki/Pages/glvpn-anyconnect-install.aspx AnyConnect VPN] or similar software. Please see: [https://vpn.ufl.edu https://vpn.ufl.edu] for additional information.
 +
 +
=X11 Forwarding=
 +
For the simplest case of running a lightweight GUI application for a very short time you can log into HiPerGator with
 +
ssh -Y MYUSER@hpg.rc.ufl.edu
 +
load the environment module your application is in and run it. Do not analyze data this way, but running a text editor, a web browser to log in and get an api token from a remote service or some other very short and lightweight operations are fine.
  
 
=Open OnDemand=
 
=Open OnDemand=
Line 16: Line 21:
 
'''Ondemand is currently a Beta service. Users are welcome to test the service and submit support requests with feedback. However, no SLA is guaranteed and all features should be considered experimental.'''
 
'''Ondemand is currently a Beta service. Users are welcome to test the service and submit support requests with feedback. However, no SLA is guaranteed and all features should be considered experimental.'''
  
=GUI2=
+
==[https://mediasite.video.ufl.edu/Mediasite/Play/4654bfa838624de894085bf54678848f1d Using Open on Demand on HiPerGator]==
 +
[[File:Play_icon.png|frameless|30px|link=https://mediasite.video.ufl.edu/Mediasite/Play/4654bfa838624de894085bf54678848f1d]] [5 min, 11 sec]
 +
This video covers the use of Open on Demand https://openondemand.org/ on HiPerGator via https://ood.rc.ufl.edu/.
 +
* Connect to https://ood.rc.ufl.edu/
 +
* Launch a terminal
 +
* Launch many graphical applications like Rstudio, Matlab and Freeview
 +
* Manage job submission
 +
* Upload, download and edit files via your browser
 +
 
 +
=RC GUI-2.0=
 
This is the second iteration of the UFRC approach to starting GUI programs in SLURM jobs on HiPerGator and attaching to them over any modern web browser.
 
This is the second iteration of the UFRC approach to starting GUI programs in SLURM jobs on HiPerGator and attaching to them over any modern web browser.
==Start GUI Session==
+
 
 +
The new gui/2 module is explained in this video:
 +
[[File:Play_icon.png|frameless|30px|link=https://mediasite.video.ufl.edu/Mediasite/Play/195d0d9dc3e640ffb874cf90ac505a1a1d]] [5 min, 16 sec]
 +
 
 +
==Start Session==
 
* Log into HiPerGator
 
* Log into HiPerGator
 
* Load the environment module
 
* Load the environment module
Line 25: Line 43:
 
:* Example: RStudio with 2 cpus, 8gb of memory, 24 hours of run time
 
:* Example: RStudio with 2 cpus, 8gb of memory, 24 hours of run time
 
  $ gui start -e rstudio -c 2 -m 8 -t 24
 
  $ gui start -e rstudio -c 2 -m 8 -t 24
 +
:* If the executable you want to run is not the same as the module name you need to use --module
 +
$ gui start --module fsl/6.0.3 -e fsleyes -c 2 -m 8 -t 24
 
:* Example: Matlab with default resources (1 cpu, 4gb memory, 2 hours of run time)
 
:* Example: Matlab with default resources (1 cpu, 4gb memory, 2 hours of run time)
 
  $ gui start -e matlab
 
  $ gui start -e matlab
Line 31: Line 51:
 
  $ gui start --gpu -e matlab
 
  $ gui start --gpu -e matlab
  
==Show Running GUI Sessions==
+
==Show Running Sessions==
 
'''Note:''' Give the session from few seconds to a couple of minutes to start if the output is empty.
 
'''Note:''' Give the session from few seconds to a couple of minutes to start if the output is empty.
 
  $ gui show
 
  $ gui show
Line 55: Line 75:
 
location bar on your LOCAL computer located on campus or connected via VPN
 
location bar on your LOCAL computer located on campus or connected via VPN
 
</pre>
 
</pre>
==Connect To a GUI Session==
+
 
 +
==Connect To Session==
 
* Attach to a session
 
* Attach to a session
 
Copy and paste a session URI into a modern browser (tested on Firefox and Chrome/Chromium) e.g.
 
Copy and paste a session URI into a modern browser (tested on Firefox and Chrome/Chromium) e.g.
 
  https://gui3.rc.ufl.edu/4207/?password=REDACTED
 
  https://gui3.rc.ufl.edu/4207/?password=REDACTED
 
As a result the browser tab becomes a 'desktop canvas' and the GUI program window should be visible and can be resized or maximized to the limits of the browser tab window as normal.
 
As a result the browser tab becomes a 'desktop canvas' and the GUI program window should be visible and can be resized or maximized to the limits of the browser tab window as normal.
 +
 
==Stop a GUI Session==
 
==Stop a GUI Session==
 
To stop a session either close the application, which will cause the SLURM job to automatically terminate, or cancel the session on the command-line with
 
To stop a session either close the application, which will cause the SLURM job to automatically terminate, or cancel the session on the command-line with
Line 85: Line 107:
  
 
=Hardware Accelerated GUI=
 
=Hardware Accelerated GUI=
This is a service to provide hardware acceleration for OpenGL applications needing 3D acceleration on HPG. 
+
To use hardware acceleration for applications launched with '''gui/2''' use the <code>--gpu</code> argument with 'gui start'
 
 
To use hardware acceleration for applications launched with gui/2 use the '--gpu' argument with 'gui start'
 
 
 
For older gui/1 approach, which uses Xpra client software please see the following page for more information:
 
 
 
[[Hardware_Accelerated_GUI_Sessions|Hardware Accelerated GUI Sessions]]
 
 
 
=GUI1=
 
This is a classic client/server approach where a gui program is started in a SLURM job on HiPerGator and is wrapped in Xpra server. Once started the session can be attached from a remote (local) computer using the xpra client software.
 
See [[GUI Version 1]] page for documentation on using the server/client xpra approach for running Gui Applications on HiPerGator.
 

Revision as of 19:58, 2 August 2021

Here you will find the information necessary to configure and run graphical user interface (GUI) applications on HiPerGator. The process is not complicated, but running a GUI on a remote server and displaying the windows on your local client computer with a sufficiently responsive interface is not as easy as simply running the application locally. We'd like to acknowledge an Open Source Xpra Project for creating software we built our GUI sessions on top of.

Open on Demand is only accessible from the UF network. Use the VPN if off campus.

If you are working off campus, you will need to use the VPN to connect to the UF campus network using AnyConnect VPN or similar software. Please see: https://vpn.ufl.edu for additional information.

X11 Forwarding

For the simplest case of running a lightweight GUI application for a very short time you can log into HiPerGator with

ssh -Y MYUSER@hpg.rc.ufl.edu

load the environment module your application is in and run it. Do not analyze data this way, but running a text editor, a web browser to log in and get an api token from a remote service or some other very short and lightweight operations are fine.

Open OnDemand

We are testing an Open OnDemand setup to provide a web-only interface to starting and attaching to GUI programs and Virtual Machines with seamless connections through web browsers. This service is now in Beta and is available at the following URL:

https://ondemand.rc.ufl.edu

To provide feedback, please open a support request with [OnDemand Feedback] in the subject. Please note:

Ondemand is currently a Beta service. Users are welcome to test the service and submit support requests with feedback. However, no SLA is guaranteed and all features should be considered experimental.

Using Open on Demand on HiPerGator

Play icon.png [5 min, 11 sec] This video covers the use of Open on Demand https://openondemand.org/ on HiPerGator via https://ood.rc.ufl.edu/.

  • Connect to https://ood.rc.ufl.edu/
  • Launch a terminal
  • Launch many graphical applications like Rstudio, Matlab and Freeview
  • Manage job submission
  • Upload, download and edit files via your browser

RC GUI-2.0

This is the second iteration of the UFRC approach to starting GUI programs in SLURM jobs on HiPerGator and attaching to them over any modern web browser.

The new gui/2 module is explained in this video: Play icon.png [5 min, 16 sec]

Start Session

  • Log into HiPerGator
  • Load the environment module
$ module load gui/2
  • Start a GUI session
  • Example: RStudio with 2 cpus, 8gb of memory, 24 hours of run time
$ gui start -e rstudio -c 2 -m 8 -t 24
  • If the executable you want to run is not the same as the module name you need to use --module
$ gui start --module fsl/6.0.3 -e fsleyes -c 2 -m 8 -t 24
  • Example: Matlab with default resources (1 cpu, 4gb memory, 2 hours of run time)
$ gui start -e matlab

See gui start -h to see all available options.

  • Example: Hardware-accelerated MatLab instance
$ gui start --gpu -e matlab

Show Running Sessions

Note: Give the session from few seconds to a couple of minutes to start if the output is empty.

$ gui show

The output will look similar to the following e.g. with four active sessions and real passwords listed instead of 'REDACTED' in the example:

Current GUI sessions:
______________________________________________________________________________
#:  JobID    Application   Type  State       Reason
1: 38005270  rstudio       gui   RUNNING     
2: 38005271  rstudio       gui   RUNNING     
3: 38005272  rstudio       gui   RUNNING  
4: 38005355  matlab        gui   RUNNING     

------------------------------------------------------------------------------
Connection URLs:
1: https://gui3.rc.ufl.edu/4207/?password=REDACTED
2: https://gui3.rc.ufl.edu/5713/?password=REDACTED
3: https://gui5.rc.ufl.edu/12474/?password=REDACTED
4: https://gui5.rc.ufl.edu/4078/?password=REDACTED
______________________________________________________________________________

Please copy a connection URL and paste it into a modern web browser's
location bar on your LOCAL computer located on campus or connected via VPN

Connect To Session

  • Attach to a session

Copy and paste a session URI into a modern browser (tested on Firefox and Chrome/Chromium) e.g.

https://gui3.rc.ufl.edu/4207/?password=REDACTED

As a result the browser tab becomes a 'desktop canvas' and the GUI program window should be visible and can be resized or maximized to the limits of the browser tab window as normal.

Stop a GUI Session

To stop a session either close the application, which will cause the SLURM job to automatically terminate, or cancel the session on the command-line with

gui stop SESSION_ID

E.g.

$ gui stop 3
Current GUI sessions:
______________________________________________________________________________
#:  JobID    Application   Type  State       Reason
1: 38005270  rstudio       gui   RUNNING     
2: 38005271  rstudio       gui   RUNNING     
3: 38005272  rstudio       gui   COMPLETING  Stopping session and cleaning up
------------------------------------------------------------------------------
Connection URLs:
1: https://gui3.rc.ufl.edu/4207/?password=REDACTED
2: https://gui3.rc.ufl.edu/5713/?password=REDACTED
______________________________________________________________________________

Please copy a connection URL and paste it into a modern web browser's
location bar on your LOCAL computer located on campus or connected via VPN

This is all it should take to use the 2nd generation setup.

Hardware Accelerated GUI

To use hardware acceleration for applications launched with gui/2 use the --gpu argument with 'gui start'