Request a node:
user.name@login ~]$ srun --pty bashuser.name@node02 ~]$
Make a directory for Jupyter scripts and cd into it.
user.name@node02 ~]$ mkdir jupyterScriptsuser.name@node02 ~]$ cd jupyterScriptsuser.name@node02 jupyterScripts]$
Copy the installation and starting scripts into your directory.
user.name@node02 jupyterScripts]$ cp /apps/jupyter-notebook/* ./user.name@node02 jupyterScripts]$ lsinstall-jupyter-notebook.sh start-jupyter-notebook.shuser.name@node02 jupyterScripts]$
Run the install script.
user.name@node02 jupyterScripts]$ bash install-jupyter-notebook.shCreating new environment now...Collecting package metadata (repodata.json): doneSolving environment: done## Package Plan ##environment location: /home/usd.local/adison.kleinsasser/anaconda3/envs/jupyteradded / updated specs:- ipykernel- jupyterThe following packages will be downloaded:package | build---------------------------|-----------------bleach-3.1.1 | py_0 111 KB conda-forgegst-plugins-base-1.14.5 | h0935bb2_2 6.8 MB conda-forge
Use "exit" to exit the node.
user.name@node02 jupyterScripts]$ exituser.name@login jupyterScripts]$
(If you are entering the tutorial here, navigate to the directory that contains "start-jupyter-notebook.sh".)
Run start-jupyter-notebook.sh using bash.
user.name@login jupyter]$ bash start-jupyter-notebook.sh
If you have already opened Jupyter before (and your password is already set) you may skip to the "Start Tunnel" section.
If you are starting Jupyter for the first time, it will prompt you to create a password for your Jupyter Notebook installation. This can be changed or reset at a later time and is not related to your University password.
If you forget your password and need to reset it:
Open your Jupyter environment.
email@example.com@local jupyterScripts]$ conda activate jupyter(jupyter) firstname.lastname@example.org@local jupyterScripts]$
Then run "jupyter notebook password". Enter a new password when prompted. (Remember, the cursor won't move while typing a password.)
(jupyter) email@example.com@local jupyterScripts]$ jupyter notebook passwordEnter password:Verify password:[NotebookPasswordApp] Wrote hashed password to /home/usd.local/adison.kleinsasser/.jupyter/jupyter_notebook_config.json(jupyter) firstname.lastname@example.org@local jupyterScripts]$
Don't forget to deactivate your environment.
(jupyter) email@example.com@local jupyterScripts]$ conda firstname.lastname@example.org@local jupyterScripts]$
After running the
bash start-jupyter-notebook.shcommand (and setting a password if necessary), an ssh command and a localhost link will appear in the terminal (They aren't click-able).
Copy the ssh command from the print-out. (Do not use Ctrl-C, it'll cut off the job).
Open a second terminal, and paste the command into it.
Then hit "Enter".
Back in the first terminal, copy the localhost link:
Then open a browser, and paste it in the address bar (Note: your link will likely be different from the one shown- don't copy the one in the picture).
Press "Enter", then enter your password when prompted:
and Jupyter will come up.
When you are done with Jupyter, don't simply close the browser. Make sure you shut down the server as well. Click on the "Quit" button in Jupyter:
The first terminal will then look like this:
Notice that the command prompt has come back. In the second terminal, use Ctrl-C to bring back the command line.