When you execute Jupyter Lab on a computing node, you can launch it in the following way. Please note that the execution of the process parallelism is not supported.
Please change the user name (b59999) and queue name (gr199999b) as appropriate.
Load module of Miniforge.
$ module load miniforge3
If you are using JypyterLab for the first time, install it with the following command (You only need to do it once by running)
$ conda install jupyterlab
Launch JupyterLab on the computing node. (e.g., When using gr19999b queue in the system B)
$ vi run.sh
#!/bin/bash
#============ Slurm Options ===========
#SBATCH -p gr19999b
#SBATCH --rsc c=8 # Specify the requested resources (Example of 8 cores)
#SBATCH -t 3:00:00
#SBATCH -o %x.%j.out # Specify the standard output file for the job
#============ Shell Script ============
set -x
srun jupyter lab --no-browser --ip=0.0.0.0
Submits a job.
$ sbatch run.sh
$ tssrun -p gr19999b --rsc c=8 jupyter lab --no-browser --ip=0.0.0.0
For Batch Processing
[b59999@laurel31 ~]$ tail <Standard output files>
[C 2024-05-24 15:34:18.069 ServerApp]
To access the server, open this file in a browser:
file:///home/b/b59999/.local/share/jupyter/runtime/jpserver-4144334-open.html
Or copy and paste one of these URLs:
http://xb0037:8888/lab?token=f1031ba47cc702ccaac0433646ed4a848827a88b14521841
http://127.0.0.1:8888/lab?token=f1031ba47cc702ccaac0433646ed4a848827a88b14521841
For Interactive Processing
[b59999@laurel31 ~]$ tssrun -p gr19999b jupyter lab --no-browser --ip=0.0.0.0
(Omitted)
[C 2024-05-22 17:08:38.648 ServerApp]
To access the server, open this file in a browser:
file:///home/b/b59999/.local/share/jupyter/runtime/jpserver-4144334-open.html
Or copy and paste one of these URLs:
http://xb0037:8888/lab?token=f1031ba47cc702ccaac0433646ed4a848827a88b14521841
http://127.0.0.1:8888/lab?token=f1031ba47cc702ccaac0433646ed4a848827a88b14521841
Launch a web browser on the login node.
$ firefox
In the connection information obtained in Step 3 of "how to launch on the computing node", change "xbXXXX" to "xbXXXX-ib0" in the line beginning with "http://xbXXXX:Port number/lab?token (omitted below)" listed on the second line from the bottom and enter it in the address field and then connect.
(e.g.,)http://xb0037-ib0:8888/lab?token=f1031ba47cc702ccaac0433646ed4a848827a88b14521841
$ ssh -L Port number:xbXXXX-ib0:Port number b59999@laurel.kudpc.kyoto-u.ac.jp
In the connection information obtained in Step 3 of "how to launch on the computing node", change "xbXXXX" to "xbXXXX-ib0" in the line beginning "http://xbXXXX:Port number/lab?token (omitted below)" listed on the second line from the bottom and enter 4-digit number followed by "xbXXXX" for the port number.
(e.g.,)$ ssh -L 8888:xb0037-ib0:8888 b59999@laurel.kudpc.kyoto-u.ac.jp
In the connection information obtained in Step 3 of "how to launch on the computing node", change "xbXXXX" to "xbXXXX-ib0" in the line beginning "http://xbXXXX:Port number/lab?token (omitted below)" listed on the second line from the bottom and enter 4-digit number followed by "xbXXXX" for the port number.
(e.g.)<Forwarded port>:8888、<Remote server>:xb0037-ib0、<Remote port>:8888
After completing step 7, go to View in Web Browser.
Press Ctrl+C twice at the prompt launched JupyterLab and terminate JupyterLab.