Request a node:
Make a directory for Jupyter scripts and cd into it.
[email protected] ~]$ mkdir jupyterScripts[email protected] ~]$ cd jupyterScripts
Copy the installation and starting scripts into your directory.
[email protected] jupyterScripts]$ cp /apps/jupyter-notebook/* ./[email protected] jupyterScripts]$ lsinstall-jupyter-notebook.sh start-jupyter-notebook.sh
Run the install script.
[email protected] 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.
(If you are entering the tutorial here, navigate to the directory that contains "start-jupyter-notebook.sh".)
Run start-jupyter-notebook.sh using bash.
[email protected] 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 protected]@local jupyterScripts]$ conda activate jupyter(jupyter) [email protected]@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 protected]@local jupyterScripts]$ jupyter notebook passwordEnter password:Verify password:[NotebookPasswordApp] Wrote hashed password to /home/usd.local/adison.kleinsasser/.jupyter/jupyter_notebook_config.json(jupyter) [email protected]@local jupyterScripts]$
Don't forget to deactivate your environment.
(jupyter) [email protected]@local jupyterScripts]$ conda deactivate[email protected]@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.