Skip to content

Instantly share code, notes, and snippets.

@cory-weller
Last active May 26, 2023 15:14
Show Gist options
  • Select an option

  • Save cory-weller/0a1bd816de1d84775594c88d41695cc8 to your computer and use it in GitHub Desktop.

Select an option

Save cory-weller/0a1bd816de1d84775594c88d41695cc8 to your computer and use it in GitHub Desktop.

Instructions based on those from the Biowulf team

You must be on the NIH network on campus, or connected to VPN.

Then, start an interactive session from the command-line on Biowulf:

# On BIOWULF:
sinteractive --mem 20G --time 8:00:00 --gres lscratch:20 --tunnel

Wait for the interactive node to be allocated, at which point it will tell you which port to use for SSH tunneling.

Copy and paste the ssh command into terminal (for mac) or powershell (for windows).

# On YOUR LAPTOP, run the command printed to the terminal.
# It will look something like the following, with numbers
# instead of Xs, and your computing ID instead of USER.
ssh  -L XXXXX:localhost:XXXXX USER@biowulf.nih.gov

It will authenticate your connection to biowulf. You may need to type your Biowulf password.

Now, back on the original Biowulf connection (where you first requested an interactive node):

# Load the module
module load rstudio-server/2023.03.0-386

# Start rstudio-server
rstudio-server

You will be given a URL to paste into your browser window. It should automatically authenticate after loading.

You will start in your default home directory. The location you're currently working in can be seen with getwd() and can be changed with setwd().

# in R:
getwd()                              # Prints current Working Directory
setwd('/data/userid/projectname/')   # changes current working directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment