You must setup your own Python environment and Jupyter installation to use Jupyter Notebook.
- Go to https://www.python.org/downloads/source/
- Choose the “gzipped source tarball” for the Python release you want and copy the link location to be used with the
- ssh to kestrel and perform the following commands to compile and install Python:
wget https://www.python.org/ftp/python/3.10.5/Python-3.10.5.tgz (or your preferring version from the link you copied above)
tar xzvf Python-3.10.5.tgz
./configure --prefix=/home/YOURUSERNAME/python3/ --with-openssl=/usr/local/openssl11
- Use the following 2 commands to use your Python environment:
- Use the following 2 commands to install Jupyter:
- edit /home/YOURUSERNAME/.jupyter/jupyter_notebook_config.py and add the following line to end of the file:
pip3 install jupyter
jupyter notebook --generate-config
c.NotebookApp.ip = '*'
Submitting a Jupyter Notebook job
- Type qjupyter at the command line and answer the questions. An example is given below.
[user@kestrel ~]$ qjupyter This script will submit a Jupyter Notebook job. You will need to setup your own Python environment and Jupyter installation. Please see https://hpc.chem.wisc.edu/software/kestrel-software/jupyter-notebook/ for details. Press Ctrl-C at any time to quit without job submission. Please provide a job name: notebook1 How many cores do you wish to allocate to this job? 4 Which queue do you wish to use? (enter for default) Please enter your Python Path: /home/username/python3 Submitting your job named notebook1 to the default queue using 4 cores with a PYTHONPATH of /home/username/python3 Proceed? (y/n) y 105256.kestrel.chem.wisc.edu Please check notebook1.log in your home directory for compute node name and URL info.
Setup SSH tunnel to connect to Jupyter
- Look in the JOBNAME.log file in your home directory for the last few lines, similar to:
To access the notebook, open this file in a browser: file:///home/user/.local/share/jupyter/runtime/nbserver-131237-open.html Or copy and paste one of these URLs: http://compute-0-0.local:8888/?token=3868bc184d1b82bdcf5d71622a3ad3bc72cf6839e2c14b4a or http://127.0.0.1:8888/?token=3868bc184d1b82bdcf5d71622a3ad3bc72cf6839e2c14b4a
- Enter the following at the command-line on your local machine, where compute-0-0 is the compute node name from the step above:
- Enter your username and password.
ssh -L 8888:compute-0-0:8888 kestrel.chem.wisc.edu
- Run PuTTY and enter
kestrel.chem.wisc.eduthe Hostname box of the main Session window.
- Under the Connection section, navigate to SSH and then Tunnels.
8888in the Source port box.
compute-0-0:8888in the Desination box, where compute-0-0 is the compute node name from the step above.
- Click Add.
- Click Open and enter your username and password.
- Open a browser on your local machine and enter the line from the JOBNAME.log file that started with http://127.0.0.1:8888, including the token hash.
- You can close the browser window and your job will continue to run and use resources. You will need to click the Quit button in the web interface or delete the job using the
qdelcommand to stop it from running.