Skip to content

Jupyter Notebook

Launch a Jupyter notebook on the cluster for development work. Each notebook will run up to 6 hours before being terminated. After 6 hours, users will be required to relaunch it again with the mynotebook command.

Users should consider using the execnotebook command for long running jobs instead.

Provisioning a Jupyter Notebook

  1. Log on to Origami and input the following command to launch Jupyter notebook.

    1
    2
    3
    [IS000G3@origami ~]$ mynotebook
    You are using Jupyter 📔 🚀 v3.2
    ... output truncated
    
  2. Enter the SMU email to receive Start and End email notifications.

    1
    2
    3
    Please provide your SMU email address : exampleuser1@scis.smu.edu.sg
    This will be the email receiving the Jupyter notebook start and end notifications
    ... output truncated
    
  3. Select between a CPU or GPU Notebook.

    1
    2
    3
    4
    Would you like a CPU or GPU enabled Notebook?
    1) CPU only notebook
    2) GPU enabled notebook
    Select an option :
    
  4. Select what library would be used for the notebook

    1
    2
    3
    4
    5
    6
    7
    8
    9
    Which notebook do you require?...
    Do you require Tensorflow or PyTorch related modules to be loaded?
    We will only install jyupter notebook you need to install tensorflow or pytorch
    or pytorch separately on your own
    
    1) Notebook with Tensorflow
    2) Notebook with PyTorch
    3) Only Python v3.11.7
    ... output truncated
    
  5. A Jupyter notebook will be provisioned, follow the on screen instructions to connect to the notebook.

    Limited Availbility

    If there are no current GPUs available, the notebook will not be launched

  6. Copy the command from the output and execute it in a new terminal tab or window, when prompted enter your cluster email. There should be no additional outputs after inputting your password correctly.

    An example is shown below —

    A copy of the instructions below are saved in your home directory under the file 'jupyterReconnectingInstructions.txt'
    Commands shown below is unique and will only be valid until 2022-01-01 16:21:39 hrs
    Please execute the mynotebook command again after this time
    
    ========================= NOTEBOOK INFORMATION =========================
    
    Run the following command on a your laptop's terminal/powershell to establish a tunnel
    ssh -N -vv -L 8924:10.2.1.60:8924 exampleuser@origami.smu.edu.sg
    You should not run the above command in this window
    
    Copy and paste the following address into your browser (eg Chrome/Edge/Firefox)
    http://127.0.0.1:8924/?token=faketoken
    
    ========================= NOTEBOOK INFORMATION =========================
    ... output truncated
    
  7. On your local computer, open a new terminal/powershell window and paste the command you've copied

    An example is shown below —

    1
    2
    3
    4
    5
    6
    7
    8
    ❯ ssh -N -vv -L 8924:10.2.1.60:8924 exampleuser@origami.smu.edu.sg
    OpenSSH_8.9p1, OpenSSL 1.1.1m  14 Dec 2021
    debug1: Reading configuration data /Users/andrew/.ssh/config
    debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
    debug2: resolving "origami.smu.edu.sg" port 22
    debug1: Connecting to origami.smu.edu.sg [10.0.104.102] port 22.
    debug1: Connection established.
    ... output truncated
    
  8. Return to the previous terminal/powershell window, copy the Jupyter notebook URL that is shown in your terminal window.

    An example is shown below —

    A copy of the instructions below are saved in your home directory under the file 'jupyterReconnectingInstructions.txt'
    Commands shown below is unique and will only be valid until 2022-01-01 16:21:39 hrs
    Please execute the mynotebook command again after this time
    
    ========================= NOTEBOOK INFORMATION =========================
    
    Run the following command on a your laptop's terminal/powershell to establish a tunnel
    ssh -N -vv -L 8924:10.2.1.60:8924 exampleuser@origami.smu.edu.sg
    You should not run the above command in this window
    
    Copy and paste the following address into your browser (eg Chrome/Edge/Firefox)
    http://127.0.0.1:8924/?token=faketoken
    
    ========================= NOTEBOOK INFORMATION =========================
    ... output truncated
    
  9. Paste the URL into the browser and you will be able to connect to the notebook on the server.

  10. When development work is completed, terminate the notebook with the scancel command to free up the instance for other users.

Troubleshooting & Tips

How to install python packages/libraries within the notebook

To install python packages/libraries from within the Jupyter notebook. Append a ! symbol to the start of the command as shown —

!pip3 install torch
!pip3 install numpy

Reconnecting to the notebook in the event of accidental browser closures or network disruptions

You can retrieve the reconnection instructions by issuing the following command in a terminal/powershell that is connected to the server

[IS000G3@origami ~]$ cat juypterReconnectingInstructions.txt

How to view lapsed time of the notebook

Use the following command

[IS000G3@origami ~]$ myqueue