Jupyter: Difference between revisions
Line 10: | Line 10: | ||
jupyter notebook --no-browser --ip=$host | jupyter notebook --no-browser --ip=$host | ||
</pre> | </pre> | ||
The server should start running and provide you with a URL that looks something like this: | The server should start running and provide you with a URL including a port # (typically but not always 8888) and a compute node on cheaha (for example C0047) that looks something like this: | ||
<pre> | <pre> | ||
Line 20: | Line 20: | ||
Now, start up a new tab/terminal/window on your client machine, and relogin to cheaha, using | Now, start up a new tab/terminal/window on your client machine, and relogin to cheaha, using | ||
<pre> | <pre> | ||
ssh -L | ssh -L 88XX:c00XX:88XX BLAZERID@cheaha.rc.uab.edu | ||
</pre> | </pre> | ||
'''Note:''' | '''Note:''' | ||
* c00XX is the compute node where you started the jupiter notebook | * c00XX is the compute node where you started the jupiter notebook, for example c0047 | ||
* | * 88XX is the port that the notebook is running, for example 8888 | ||
Now access the link generated by jupyter notebook | Now access the link on your client machine browser locally using the link generated by jupyter notebook but substituting in localhost instead of c00XX. Make sure you have the correct port as well. | ||
<pre> | |||
http://localhost:88XX/?token=73da89e0eabdeb9d6dc1241a55754634d4e169357f60626c&token=73da89e0eabdeb7d6dc1241a55754634d4e169357f60626c | |||
</pre> | |||
A Jupyter notebook should then open in your browser. |
Revision as of 16:35, 29 August 2018
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. For more information on jupyter notebook, click here.
Jupyter on Cheaha
The cheaha cluster supports Jupyter notebooks for data analysis, but such jobs should be running using the SLURM job submission system to avoid overloading the head node. To run a Jupyter Notebook on cheaha, login to cheaha from your client machine and start an interactive job
srun --ntasks=1 --cpus-per-task=4 --mem-per-cpu=4096 --time=08:00:00 --partition=medium --job-name=JOB_NAME --pty /bin/bash module load Anaconda3/5.2.0 unset XDG_RUNTIME_DIR jupyter notebook --no-browser --ip=$host
The server should start running and provide you with a URL including a port # (typically but not always 8888) and a compute node on cheaha (for example C0047) that looks something like this:
Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://c0047:8888/?token=73da89e0eabdeb9d6dc1241a55754634d4e169357f60626c&token=73da89e0eabdeb7d6dc1241a55754634d4e169357f60626c
Now, start up a new tab/terminal/window on your client machine, and relogin to cheaha, using
ssh -L 88XX:c00XX:88XX BLAZERID@cheaha.rc.uab.edu
Note:
- c00XX is the compute node where you started the jupiter notebook, for example c0047
- 88XX is the port that the notebook is running, for example 8888
Now access the link on your client machine browser locally using the link generated by jupyter notebook but substituting in localhost instead of c00XX. Make sure you have the correct port as well.
http://localhost:88XX/?token=73da89e0eabdeb9d6dc1241a55754634d4e169357f60626c&token=73da89e0eabdeb7d6dc1241a55754634d4e169357f60626c
A Jupyter notebook should then open in your browser.