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
-
Log on to Origami and input the following command to launch Jupyter notebook.
| [IS000G3@origami ~]$ mynotebook
You are using Jupyter 📔 🚀 v3.2
... output truncated
|
-
Enter the SMU email to receive Start and End email notifications.
| 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
|
-
Select between a CPU or GPU Notebook.
| Would you like a CPU or GPU enabled Notebook?
1) CPU only notebook
2) GPU enabled notebook
Select an option :
|
-
Select what library would be used for the notebook
| 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
|
-
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
-
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
|
-
On your local computer, open a new terminal/powershell window and paste the command you've copied
An example is shown below —
| ❯ 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
|
-
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
|
-
Paste the URL into the browser and you will be able to connect to the notebook on the server.
-
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