Using R Studio
Start RStudio Server in Singularity Container
First, you will need to start the interactive job on the compute node. Please note that you will need to change traine to your username. For example,
[(it_css:traine)@login00.darwin ~]$ SLURM_EXPORT_ENV=NONE salloc --mem=2G --time=1:00:00 --partition=idle #on Caviness, you may need to use partition such as standard salloc: Pending job allocation 5406889 salloc: job 5406889 queued and waiting for resources salloc: job 5406889 has been allocated resources salloc: Granted job allocation 5406889 salloc: Waiting for resource configuration salloc: Nodes r1n17 are ready for job
Then, use the VALET to load the RStudio package,
[(it_css:traine)@r1n17 ~]$ vpkg_require r-studio-server/4.2.1 Adding dependency `squashfs-tools/4.5.1` to your environment Adding dependency `singularity/3.11.1` to your environment Adding package `r-studio-server/4.2.1` to your environment
After loading the package, start the rserver in the singularity container.
[(it_css:traine)@r1n17 ~]$ Sexec rserver --server-user=$USER TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rserver.log'. TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rsession-traine.log'.
Establish SSH Tunnel
If you are using Linux/Mac, open the terminal on your laptop, then
ssh -L 8787:r1n17:8787 traine@darwin.hpc.udel.edu
You may need to change r1n17 to be the node name for your interactive job running. If you are using a Windows machine, open PuTTY and enter traine@darwin.hpc.udel.edu as the hostname. In addition to your standard connection PuTTY settings, you will need to set up the tunnel setting. The tunnel setting is found under the Category Connection → SSH → Tunnels. Add the Source port as 8787 and Destination as 8787:r1n17:8787(you will need to change the node name based on your interactive job), then click on Add. The Tunnel settings are now available to your session, so click Open to connect. You may need to enter the password for the DARWIN account in the prompted window. This SSH tunnel connection will have to remain open while you are using RStudio.
Access RStudio Interface
Keep the SSH tunnel connection open and open the web browser, go to
localhost:8787
Then you will see the session for RStudio has started. After the job is completed, you will need to close the SSH tunnel and exit the RStudio session.