Running Jupyter Notebook on Quest

Jupyter Notebook can be launched and run on a Quest compute node through an interactive job on Quest.

To schedule the interactive job from the command line on Quest, ssh into a login node and type:

msub -I -l nodes=1:ppn=1 -l walltime=04:00:00 -A <allocation_name> -q <queue_name>

This example requests a single core for a 4 hour job. Substitute an active allocation name and queue name, for example if using allocation p12345 this might be:

msub -I -l nodes=1:ppn=1 -l walltime=04:00:00 -A p12345 -q short

Requesting a single core provides 4GB of RAM for that session. To have access to additional memory for the session, request additional cores; on Quest, each core provides roughly 4GB of RAM. Note that the more cores requested, the longer the wait for the interactive session to start. Do not request more than 1 node for Jupyter notebook sessions.

Once the session begins, get the name of the compute node the session has landed on:

hostname

Load the version of python that you require for the session. For example, to load Python 2.7:

module load python/anaconda

To use Python 3 instead, use module load python/anaconda3 or module load python/anaconda3.6. Once the correct Python module has loaded, type:

jupyter notebook --port=8899 --no-browser

This example uses port 8899, but a different port can be specified if necessary (for example, if another user is already using that port).

Once jupyter notebook is running on the compute node, open a new terminal window on your local computer, and type:

ssh -L 8899:localhost:8899 <your_netID>@quest.northwestern.edu ssh -N -L 8899:localhost:8899 qnode<number>

If using a different port number, substitute it for the number "8899" in the command. Be sure and use your netID, and at the end replace qnode<number> with the name of the compute node. You will be prompted for your Quest password, which will not return a prompt.

On your local computer, open up your browser and connect to http://localhost:8899/. If not using port 8899, change the address to use the port specified when you launched jupyter notebook. Your browser is now connected to the jupyter notebook session running on Quest.

Note that your jupyter notebook session will quit abruptly when the walltime of the interactive job comes to an end. Save often and be aware of walltime to avoid losing your work.

See Also:




Keywords:research computing, jupyter, python, quest, anaconda, notebook, ipython   Doc ID:88448
Owner:Research Computing .Group:Northwestern
Created:2018-12-13 13:51 CSTUpdated:2018-12-13 15:00 CST
Sites:Northwestern
CleanURL:https://kb.northwestern.edu/running-jupyter-notebook-on-quest
Feedback:  0   0