After running jupyter.ini.sh command as above, a file called client_cmd will be produced in the ${PBS_O_WIRKDIR} directory. It contains commands to forward network traffic from the defined port number of the Gadi worker node to an external client machine (i.e., your desktop or VDI) via the Gadi login node gadi.nci.org.au. The last line of the file is an url to be copied and pasted into your client machine web browser to access Gadi JupyterLab session.
Client_cmd file
The contents of client_cmd file may vary on the way to access the Jupyterlab session and whether a Dask cluster is set up:
Job with token access to Gadi JupyterLab (with -T flag).
ssh -N -L 8676:gadi-cpu-clx-2310.gadi.nci.org.au:8676 jpf777@gadi.nci.org.au # ssh port forwarding command towards the remote Jupyter Lab server. |
Job with token access to Gadi JupyterLab session (with -T flag ) together with a Dask cluster established (with -D flag).
ssh -N -L 8828:gadi-cpu-clx-2310.gadi.nci.org.au:8828 jpf777@gadi.nci.org.au # ssh port forwarding command towards the Dask dashboard. |
Job without token access to Gadi JupyterLab session.
ssh -N -L 8676:gadi-cpu-clx-2310.gadi.nci.org.au:8676 jpf777@gadi.nci.org.au # ssh port forwarding command towards the remote Jupyter Lab server. |
Job without token access to Gadi JupyterLab session together with a Dask cluster established (with -D flag).
ssh -N -L 8828:gadi-cpu-clx-2310.gadi.nci.org.au:8828 jpf777@gadi.nci.org.au # ssh port forwarding command towards the Dask dashboard. |
Whenever you set up a Dask cluster, a file called scheduler.json will be produced. It contains the information for the Dask scheduler. The file should be kept existing during the job running time.
Connect Gadi JupyterLab session from your client machine
Now you can connect to the Gadi Jupyterlab session from your own client machine
- Run those ssh port forwarding commands presented in the file client_cmd.
- Fetch the last line of client_cmd file and type it in a web browser of your client machine. Then you will access the Gadi JupyterLab session.
Note: If you haven’t set up SSH keys on your client machine, instructions on how to do this can be found here. Alternatively, you should enter your Gadi password when prompted.