software:rstudio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:rstudio [2025-03-24 16:33] anitasoftware:rstudio [2025-03-24 18:40] (current) – [Access RStudio Interface] anita
Line 1: Line 1:
-====== Using R Studio ======+====== Using RStudio ======
  
 <note tip> <note tip>
Line 6: Line 6:
 ==== Start RStudio Server in Singularity Container ==== ==== Start RStudio Server in Singularity Container ====
 <note important> <note important>
-Do not run RStudio on the login (head) nodes. Always start an interactive job on the compute node before launching RStudio. +Do not run RStudio on the login (head) nodes. Always start an interactive job on compute node before launching RStudio. 
 </note> </note>
 First, make sure you are in your workgroup, then launch an interactive job on a compute node. For example using workgroup ''it_css'', account ''traine'' and specifying the ''standard'' partition, 2GB of memory and 1 hour of time, it would look something like this First, make sure you are in your workgroup, then launch an interactive job on a compute node. For example using workgroup ''it_css'', account ''traine'' and specifying the ''standard'' partition, 2GB of memory and 1 hour of time, it would look something like this
Line 20: Line 20:
 [(it_css:traine)@r1n17 ~] [(it_css:traine)@r1n17 ~]
 </code> </code>
-Once on the compute node the prompt changes accordingly, in this case the compute node name is ''r1n17''. Now use VALET to load the RStudio package and the necessary software dependencies.+Once on compute node the prompt changes accordingly, in this case the compute node name is ''r1n17''. Now use VALET to load the RStudio package and the necessary software dependencies.
 <code bash> <code bash>
 [(it_css:traine)@r1n17 ~]$ vpkg_require r-studio-server/4.2.1 [(it_css:traine)@r1n17 ~]$ vpkg_require r-studio-server/4.2.1
Line 34: Line 34:
 </code> </code>
  
-Make a note of the compute node name, in this example ''r1n17'', as it will be needed for the next step.+Make a note of the compute node name, in this example ''r1n17'', as it will be needed for when establishing the SSH tunnel.
  
 ==== Establish SSH Tunnel ==== ==== Establish SSH Tunnel ====
Line 41: Line 41:
 </note> </note>
 === Linux/MacOS === === Linux/MacOS ===
-If you are using Linux or MacOS, open the terminal on your laptop and type+If you are using Linux or MacOS, open the terminal on your laptop or desktop computer, and type
 <code bash> <code bash>
 ssh -L 8787:r1n17:8787 traine@darwin.hpc.udel.edu ssh -L 8787:r1n17:8787 traine@darwin.hpc.udel.edu
 </code> </code>
-be sure to replace ''traine'' with your actual username, and substitute ''r1n17'' with the compute node where your interactive job is running and you started the ''rserver'' in the previous step. You will need to log in using your DARWIN credentials in this terminal. If you are doing this on Caviness, then you would use the same command but replace ''darwin.hpc.udel.edu'' with ''caviness.hpc.udel.edu''.+be sure to replace ''traine'' with your actual username, and substitute ''r1n17'' with the compute node name where your interactive job is running and where you started ''rserver'' in the previous step. You will need to log in using your DARWIN credentials in this terminal. If you are doing this on Caviness, then you would use the same command but replace ''darwin.hpc.udel.edu'' with ''caviness.hpc.udel.edu''.
  
 === Windows === === Windows ===
Line 52: Line 52:
 {{:software:rstudio-putty-1.png?400|}} {{:software:rstudio-putty-1.png?400|}}
  
-If you are doing this on Caviness, then you would use ''caviness.hpc.udel.edu'' instead of ''darwin.hpc.udel.edu''. In addition to your standard connection settings, you'll need to set up an SSH tunnel. To do this, navigate to **Connection → SSH → Tunnels** in PuTTY. Then, add the **Source Port** to ''8787'' and the **Destination** to ''r1n17:8787'' (remember to replace ''r1n17'' with the compute node where your interactive job is running and you started the ''rserver'' in the previous step). +If you are doing this on Caviness, then you would use ''caviness.hpc.udel.edu'' instead of ''darwin.hpc.udel.edu''. In addition to your standard connection settings, you'll need to set up an SSH tunnel. To do this, navigate to **Connection → SSH → Tunnels** in PuTTY. Then, add the **Source Port** to ''8787'' and the **Destination** to ''r1n17:8787'' (remember to replace ''r1n17'' with the compute node name where your interactive job is running and where you started ''rserver'' in the previous step). 
  
 {{:software:rstudio-putty-2.png?400|}} {{:software:rstudio-putty-2.png?400|}}
  
-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.+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.
  
 {{:software:rstudio-putty-3.png?400|}} {{:software:rstudio-putty-3.png?400|}}
  
 ==== Access RStudio Interface ==== ==== Access RStudio Interface ====
-Once SSH tunnel connection is open, then open a web browser and navigate to the following URL+Once SSH tunnel connection is established, then open a web browser on your laptop or desktop computer and navigate to the following URL
 <code> <code>
 localhost:8787 localhost:8787
 </code>  </code> 
-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, and stop the ''rserver' on the compute node, and type ''exit'' to end the interactive job.+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 ''rserver'' on the compute node with ''CTRL-C'', and then type ''exit'' to end the interactive job.
  • software/rstudio.1742848416.txt.gz
  • Last modified: 2025-03-24 16:33
  • by anita