Skip to content

cluster access

manojneuro edited this page Sep 20, 2018 · 20 revisions

Cluster access

  1. How to access Adroit
  2. How to access Scotty

How to access Adroit with OnDemand

  1. Go to https://myadroit.princeton.edu/
  2. Interactive Apps → jupyter notebook for NEU 350/480
  3. Configure the amount of resource → Launch
  4. Wait until the job status bar turned green and click connect to Jupyter
  5. You are on Adroit!

How to get the assignment

  1. First, you need to accept the assignment via github classroom.
  2. Once you accepted the assignment, you will get a URL for your repo in the form of labX-topic_of_that_week-your_github_id.
  3. Go to OnDemand https://myadroit.princeton.edu/ , and launch a terminal by clicking clusters → adroit cluster shell access
  4. Follow the login instruction.
  5. To clone your repo to your current directory, type git clone labX-topic_of_that_week-your_github_id
  6. Have fun with the notebooks!

Common QAs

  • How to switch to Jupyter lab (on Adroit ondemand)

    • after you clicked "connect to jupyter", your url should look like this https://myadroit.princeton.edu/node/adroit-04/32351/tree?
    • change tree to lab
  • If you are not using Princeton WIFI, you might need VPN: https://www.net.princeton.edu/vpn/

  • My notebook session crashed...

    • It might be a memory issue. Please re-start a notebook session with more cores.

How to access Scotty

This is only for Graduate Students, Postdocs, and Faculty.

Make sure you have a Princeton netID and that it is activated. More information about netIDs can be found here: https://princeton.service-now.com/snap?id=kb_article&sys_id=1f2a27064f9ca20018ddd48e5210c78d

Make sure you have a PNI account. This can be requested by your PI. If you are not sure how to get started with this process, send an email to pnihelp@princeton.edu.

If you are working off-campus, you will need to setup a secure remote access VPN. Information on how to configure secure remote access can be found here: https://princeton.service-now.com/snap?sys_id=6023&id=kb_article.

Windows Users Follow the instructions in this video: https://github.com/NEU480/organization/blob/master/auditors/putty_jupyter.mp4

Mac Users Try logging in for the first time. Open a terminal window and type:

ssh netID@scotty.princeton.edu

You will be prompted for a password. This should be your PNI account password (not your local machine password, and not your Princeton University password). Enter you password and hit Enter. If it is your first time logging into the cluster, you will see the following message. Don't be scared!

The authenticity of host 'scotty.princeton.edu (xxx.xxx.xxx.xxx)' can't be established. RSA key fingerprint is xxxxxxxxxxx. Are you sure you want to continue connecting (yes/no)?

Type 'yes', press Enter, and continue to enter your password. If you see [netID@scotty ~]$ in your terminal window you are successfully connected to the Scotty cluster. Congrats!

Instructions to set up a jupyter tunnel

Jupyter tunnels are wonderful things that allow you to run code on a cluster without the sluggishness of an interactive session.

  1. Start tunnel: To initiate a tunnel, run the script: ./run_jupyter_scotty.sh. Note: this script will not run if you do not have execute permissions (execute the following command in the folder where you have the script stored: chmod 711 run_jupyter_scotty.sh). It will print out a bunch of information needed to open the jupyter tunnel (see screen shot below).

Reference the above information for the following steps.

  1. Initiate local connection: In a second terminal window, copy and paste the ssh key that this command outputs. This terminal may ask for your password to login to the cluster (if you have saved your password then it will not react, but that is fine).

  2. To clone your repo to your current directory, type git clone labX-topic_of_that_week-your_github_id

  3. Point browser to notebook: In your browser copy the url (beginning with localhost) and paste it in your browser, along with the numbers after it. If prompted for a password or login token, go back to your first terminal window. You should now see a prompt that says "Copy/paste this URL into your browser...". At the end of the url, it should say "token=" followed by a long alphanumeric code. Copy the alphanumeric code only and paste into the login token field in your browser window. This will open you in a notebook directory tree.

Voilà! You are good to go. Click on any notebook to begin.

You can’t perform that action at this time.