On the cluster, create a submission file, for example From a login node, submit the job using Slurm: Slurm returns a Once the job is running, check the output file: You will find a line similar to: Note: On your computer (Linux / macOS / Windows with OpenSSH), open a terminal and run: ⚠️ Keep this terminal open while using Jupyter. On your local machine, open a web browser and paste the URL obtained earlier: You are now connected to1. Prepare the Slurm script for Jupyter
jupyter.slurm:
#!/bin/bash #SBATCH -J jupyter
#SBATCH -p PARTITION_ID
#SBATCH -A PROJECT_ID
#SBATCH -t 04:00:00
#SBATCH -o jupyter-%j.out
module load python jupyter lab --no-browser --ip=0.0.0.0
2. Submit the Jupyter job
sbatch jupyter.slurm
JobID.
The job will start as soon as resources are available.
3. Retrieve the Jupyter URL
jupyter-JOBID.out
http://127.0.0.1:8888/lab?token=25d1ef1c36f4b16b90b0a27db9f6b43b05cb041f6e787f68
This URL is only accessible from the compute node. You must therefore create an SSH tunnel.
4. Create an SSH tunnel from your local machine
ssh -N -L 8888:skylake061.cluster:8888 USER@login.mesocentre.univ-amu.fr
5. Access Jupyter Lab in your browser
http://127.0.0.1:8888/lab?token=25d1ef1c36f4b16b90b0a27db9f6b43b05cb041f6e787f68
Jupyter Lab running on the cluster, using the compute node’s resources.
6. End your session
Ctrl+C)
scancel JOBID
Summary
jupyter lab
sbatch
jupyter-JOBID.out