RStudio in a web browser

The following procedure allows you to work with RStudio in a web browser on your computer. RStudio will run on a compute node on Azzurra.

Open your home directory:

cd

This command copies a folder including a singularity container with R Studio server and a Slurm script.

cp -R /workspace/rstudio .
cd rstudio

Launch the job on a compute node. By default, this script reserves 2 cores but you can modify this by editing script.slurm. Please edit in this command your Slurm account name and the maximum duration of your job:

sbatch -A my_slurm_account -t 08:00:00 script.slurm

This will create an output file into your rstudio folder. You can list the content of this folder with this command:

ll

Read the output of your job. For example:

cat slurm-267918.out

Copy the line containing an ssh command. It is preceded by SSH tunnel from your workstation using the following command:. For example:

ssh -N -L 8787:compute23:37812 user9@login-hpc.univ-cotedazur.fr

Open a second terminal and execute the previously copied command line. Nothing occurs, this is normal. Keep this terminal open.

Open a web browser and paste the following address:

http://localhost:8787

RStudio asks for credentials. Use those contained in the job output file, previously opened.

To end your session, click on the power button at the top right corner of the window, then cancel your Slurm job using the scancel command included in the job’s output file.