Git Product home page Git Product logo

rstudio-server's Introduction

RStudio Server

https://www.singularity-hub.org/static/img/hosted-singularity--hub-%23e32929.svg

Singularity container running RStudio Server.

Example job script:

#!/bin/bash
#PBS -N rserver
#PBS -l nodes=1:ppn=1
#PBS -l mem=5gb
#PBS -l walltime=1:00:00
#PBS -j oe

# tunnel info
PORT=$(shuf -i8000-9999 -n1)
SUBMIT_HOST=$(echo ${PBS_O_HOST%%.*}.rcc.mcw.edu)

# rserver password
export RSTUDIO_PASSWORD=$(openssl rand -base64 15)

# print tunneling instructions
echo -e "
1. SSH tunnel from your workstation using the following command:
   
   ssh -L 8787:${HOSTNAME}:${PORT} ${USER}@${SUBMIT_HOST}
   
   and point your web browser to http://localhost:8787.

2. Log in to RStudio Server using the following credentials:
   user: ${USER}
   password: ${RSTUDIO_PASSWORD}
"

# load modules
module load rstudio-server/1.1.456

#start server
rstudio-server

Start an RStudio session

  1. Copy contents of rserver.pbs (example above) to a file in your home directory.

  2. Open terminal on cluster login node and submit the job script:

$ qsub rserver.pbs

Connect to RStudio session

  1. Check output file (jobname.oJOBNUM) for details.

Example output file: rserver.o152922

1. SSH tunnel from your workstation using the following command:

   ssh -L 8787:node01:9268 tester@loginnode

   and point your web browser to http://localhost:8787.

2. Log in to RStudio Server using the following credentials:
   user: ${USER}
   password: ${RSTUDIO_PASSWORD}
  1. Open second terminal and run tunneling command from the output file:
$ ssh -L 8787:node01:9268 tester@loginnode
  1. Open a browser and enter the URL from the output file:
http://localhost:8787
  1. Log in with credentials from output file.

You should now be connected to your RStudio session that is running on a cluster compute node. To close the session, select logout or stop session. If you need to reconnect, repeat steps 3 & 4. If you're done with your session, remember to stop the job with qdel.

rstudio-server's People

Contributors

maflister avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zhcf xentrics

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.