Jupyter
SCRP relies on Jupyter and JupyterHub to provide browser-based access.
Basics
Navigate to one of the following URLs on a browser:
This launches a Jupyter instance on the corresponding login node. Below is a list of software we support on Jupyter:
Software | Graphical User Interface | Jupyter Notebook | Console |
---|---|---|---|
Julia | - | Yes | Yes |
MATLAB | Yes | Yes | Yes |
Python | - | Yes | Yes |
R | Yes | Yes | Yes |
Stata | No | Yes | Yes |
Running Jupyter on a Compute Node
To launch Jupyter on a compute node, simply navigate to one of the following URLs:
Once you log in, you will see a list of predefined options with different resource configurations.
Important: when you have completed your work, please shut down the server by going to [File] > [Hub Control Panel] > [Stop My Server]. Without taking this step, your Jupyter server will keep running and count towards your resource quota.
As this option is primarily intended for teaching and code testing, we are currently setting a hard-coded limit of three hours per session. You can access the full capability of the cluster through a terminal as before.
Launching a Private Jupyter Instance through SSH
Private Jupyter Instance on a Login Node
Steps to run your own Jupyter instance on a login node through SSH, using scrp-login
as an example:
- Launch jupyter with
private-jupyter
. - You should see a URL
http://localhost:xxxx/?token=...
print on screen. - Set up SSH port forwarding:
-
On Linux, Mac OS or Windows Subsystem for Linux, connect to the login node in the following way:
ssh -L xxxx:localhost:xxxx username@scrp-login.econ.cuhk.edu.hk
where
xxxx
is the four digit number afterlocalhost:
in step 2. -
If you use PuTTY follow instructions here.
-
- On a browser, navigate to the URL you see in step 2.
Private Jupyter Instance on a Compute Node
Steps to run your own Jupyter instance on a compute node through SSH:
- Launch jupyter with
compute private-jupyter
. Adjust Slurm options as needed. - You will need two pieces of information:
- The name of the compute node you are connected to. This is the first line print on screen.
- The URL
http://localhost:xxxx/?token=...
.
-
Set up SSH port forwarding. On Linux, Mac OS or Windows Subsystem for Linux, you can set it up in the terminal:
ssh -t -L xxxx:localhost:xxxx username@scrp-login.econ.cuhk.edu.hk ssh -L xxxx:localhost:xxxx compute-node-name
where
xxxx
is the four digit number afterlocalhost:
andcompute-node-name
is what you saw on the first line in step 2. - On a browser, navigate to the URL you see in step 2.