There are two ways to start RStudio on Hydra's nodes, you can either run

  1. the RStudio desktop, or
  2. the RStudio server.

You can also use Hydra's RStudio Server.

Which version to use?

They are both full fledged RStudio, but

Running the Desktop

Log in Hydra via one of the login nodes, allowing X-tunneling and

Example:

sylvain@login01% qlogin
Your job 2453968 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 2453968 has been successfully scheduled.
Establishing /cm/shared/apps/uge/var/cm/qlogin_wrapper session to host compute-64-15.cm.cluster ...
Last login: Wed Jul  3 10:17:51 2024 from 192.168.92.121

sylvain@compute-64-15% ml tools/R/RStudio/desktop
Loading tools/R/RStudio/desktop/2024.04.2-764
  Loading requirement: tools/R/4.4.1

sylvain@compute-64-15% rstudio --no-sandbox --disable-gpu

and you should see on your machine, if the X tunnel is set right:

Note that the RStudio desktop does not work with the Windows Xming  X-server, but works with Cygwin/X and WSL.

Running the Server

Log in Hydra via one of the login nodes (no need to enable X-tunnel)

Example:

1. Start the server on an interactive node

sylvain@login01% qrsh

sylvain@compute-64-16% module load tools/R/RStudio/server
Loading tools/R/RStudio/server/2024.04.2-764
  Loading requirement: tools/R/4.4.1

sylvain@compute-64-16% start-rstudio-server
start-rstudio-server: starting RStudio server on host=compute-64-16 and port=8787
  you need to create a ssh tunnel on your local machine with
    ssh -N -L 8787:compute-64-16:8787 [email protected]

Point your browser to http://localhost:8787 on your local machine.
Use Control+C in this window to kill the server when done.

TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/home/sylvain/.local/share/rstudio/log/rserver.log'.
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/home/sylvain/.local/share/rstudio/log/rsession-sylvain.log'.

2. Start the ssh tunnel on your local machine

ssh -N -L 8787:compute-64-16:8787 [email protected]

3. Start a browser on your local machine and go to

http://localhost:8787

you should see:

         

or

         

(yse your Hydra credentials).

Notes

You could run either, the server or the desktop, on a login node but we strongly recommend that you use instead an interactive node:

There are resource limits on interactive sessions, tho,

(lightbulb) Check the relevant documentation regarding the Interactive Queue under Available Queues.

RStudio uses R version 4.4.1, not 4.4.0

The RStudio server is by default secured via normal authentication, but

(lightbulb) Since only people w/ credentials on Hydra can start a ssh tunnel, you are not exposed to the wide world.

Temporary directories with R and RStudio

TMPDIR=/scratch/genomics/USER/PROJECT/tmp

where you replace USER and PROJECT by your username and a more specific project name respectively.


Last updated  SGK/MPK