- Copy jupyter.slurm from shared directory to the designated directory jupyter.slurm
cp /cm/shared/sampleScripts/jupyter.slurm .
- Make modifications to the script
- Run jupyter.slurm file
When you run this command you will get an output saying: “Submitted batch job $jobid ”
e.g., “Submitted batch job 74533”
- Once submitted, wait a moment for the jupyter-$jobid.out file to appear (eg. jupyter-74533.out)
You can check if the job is running as expected by using
squeue -u $username
- Follow the instructions in the jupyter-jobid.out file to create a tunnel from the local machine to the machine running the jupyter notebook server.
Open a new terminal and run the ssh command written in the .out file
Insert your password
- Navigate to jupyter notebook in the local machine browser.
Open your internet browser
Copy the URL starting with “http://127.0.0.1” and paste it on the search bar of your browser. This is likely the last line in the .err file.
By default, jupyter-lab is a part of the Anaconda3 module. The file mentioned above,
/cm/shared/sampleScripts/jupyter.slurm, loads this module for you.
If you want to create your own python environment(e.g., with conda or vEnv), you will need to take special care that the jupyter server can identify the python interpreter associated with your environment.