Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

This page describes how to run RStudio in a container on Pawsey systems with Slurm.

...

For this example we're going to be using the rocker/tidyverse (external site) Docker image. At the time of writing the latest available R version is 4.3.1. It provides an R installation, the RStudio server, the R devtools and the Tidyverse collection for data science. This image ships with a startup script that allows for a number of runtime options to be specified: see the USE menu in the Rocker homepage (external site).

Setting up the job script

...

Column
width900px


Tip
titleSet the working directory within RStudio

To read data from and write data to this directory, first manually change directory to this location from inside the RStudio session (see figure 2).


The following script launches an RStudio server on the compute node (download the template batch script). The first step in the script creates a working directory before launching Rstudio.

...

  • Your [your-project-name] is replaced with your pawsey project name, e.g. pawsey####
  • You're using 1 core in the debug queue for 1 hour
  • Your work directory is $MYSCRATCH/rstudio-dir
  • It uses the rocker/tidyverse:4.3.6.1 Docker image
  • The Singularity module version is singularity/4.1.0-slurm

Run your RStudio server

To start, submit the SLURM jobscript. It will take a few minutes to start (depending on how busy the queue and how large of an image you're downloading). Once the job starts you will have a SLURM output file in your directory, which will have instructions on how to connect at the end. This file also provides the password need to connect and the directory where data will be saved. 

...