After starting a PB PBS job, we can invoke jupyter.ini.sh script to set up a pre-defined Ray cluster to utilise the compute resources requested by the job.
...
Note: You can also append "-J" flag in above commands to set up a JupyterLab session.
Connect to the Ray cluster
After it is running, you can connect to this Ray cluster in a python script as below:
...