Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:rstudio [2025-03-24 18:33] – [Establish SSH Tunnel] anita | software:rstudio [2025-03-24 18:40] (current) – [Access RStudio Interface] anita | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using RStudio ====== | ||
+ | <note tip> | ||
+ | These directions are geared towards setting up and running RStudio on DARWIN. However, these directions can easily be used on Caviness, although references to software versions, partition names and compute node names may be different. | ||
+ | </ | ||
+ | ==== Start RStudio Server in Singularity Container ==== | ||
+ | <note important> | ||
+ | Do not run RStudio on the login (head) nodes. Always start an interactive job on a compute node before launching RStudio. | ||
+ | </ | ||
+ | First, make sure you are in your workgroup, then launch an interactive job on a compute node. For example using workgroup '' | ||
+ | <code bash> | ||
+ | [traine@login00.darwin ~]$ workgroup -g it_css | ||
+ | [(it_css: | ||
+ | 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 | ||
+ | [(it_css: | ||
+ | </ | ||
+ | Once on a compute node the prompt changes accordingly, | ||
+ | <code bash> | ||
+ | [(it_css: | ||
+ | Adding dependency `squashfs-tools/ | ||
+ | Adding dependency `singularity/ | ||
+ | Adding package `r-studio-server/ | ||
+ | </ | ||
+ | Once the RStudio software is loaded, then start the '' | ||
+ | <code bash> | ||
+ | [(it_css: | ||
+ | TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/ | ||
+ | TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/ | ||
+ | </ | ||
+ | |||
+ | Make a note of the compute node name, in this example '' | ||
+ | |||
+ | ==== Establish SSH Tunnel ==== | ||
+ | <note important> | ||
+ | You must keep the SSH tunnel (terminal) open while using RStudio. | ||
+ | </ | ||
+ | === Linux/MacOS === | ||
+ | If you are using Linux or MacOS, open the terminal on your laptop or desktop computer, and type | ||
+ | <code bash> | ||
+ | ssh -L 8787: | ||
+ | </ | ||
+ | be sure to replace '' | ||
+ | |||
+ | === Windows === | ||
+ | If you are using a Windows machine, open PuTTY and enter the appropriate hostname | ||
+ | |||
+ | {{: | ||
+ | |||
+ | If you are doing this on Caviness, then you would use '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click **Add** to confirm the tunnel settings, then click **Open** to connect. You will be prompted to enter your username and password for your DARWIN (or Caviness) account depending on which hostname you used in the previous step. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ==== Access RStudio Interface ==== | ||
+ | Once SSH tunnel connection is established, | ||
+ | < | ||
+ | localhost: | ||
+ | </ | ||
+ | You should see the RStudio session start. Once you have completed your work, exit the RStudio session by closing the browser, close the SSH tunnel terminal, stop the '' |