Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to do this we need a submission script like the following called jupyter.pbs

No Format
#!/bin/bash
#SBATCH#PBS --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4G
#SBATCH --time=00:05:00
#SBATCH --job-name=jupyter-notebookN jupyterNotebook
#PBS -m abe
#PBS -M myEmail@griffithuni.edu.au
#PBS -q workq
#PBS -l select=1:ncpus=1:mem=12gb,walltime=5:00:00
module load anaconda3/2021.11

# get tunneling info
XDG_RUNTIME_DIR=""
node=$(hostname -s)
user=$(whoami)
cluster="tigercpugc-prd-hpclogin1"
port=8889

# print tunneling instructions jupyter-log
echo -e "
Command to create ssh tunnel:
ssh -N -f -L ${port}:${node}:${port} ${user}@${cluster}.rcs.princetongriffith.edu.au

Use a Browser on your local machine to go to:
localhost:${port}  (prefix w/ https:// if using password)
"

# load modules or conda environments here
module load anaconda3/2020.11
source activate myenv
# Run Jupyter
jupyter-notebook --no-browser --port=${port} --ip=${node}

...