This requests an allocation on a compute node of Adroit for 15 minutes. Once granted you can see I'm moved to the compute node adroit-14. I also ask for two tasks (you can adjust based on whether you actually use the cores or not.)
[bhicks@adroit4 ~]$ salloc -N 1 --ntasks-per-node=2 -t 15:00
salloc: Granted job allocation 497989
[bhicks@adroit-14 ~]$ export XDG_RUNTIME_DIR=""
[bhicks@adroit-14 ~]$ jupyter notebook --no-browser --port=8889 --ip=0.0.0.0
This works for Mac or Linux. For Windows, I'd have to investigate how to do an SSH tunnel
mfalcon:~ bhicks$ ssh -N -f -L 8889:adroit-14:8889 [email protected]
This does the following:
-N
- don't execute a remote command-f
- fork to background (to kill it, runps aux | grep ssh
and then kill the appropriate process.-L
- set up a local port forward of local 8889 to adroit-14 (the compute node) 8889.- Then connects as
bhicks
toadroit.princeton.edu