INNER CODE UNIT · R
node
igordot/genomics · scripts-bigpurple/jupyter.sh:43
node=$(hostname -s)
# port=$(shuf -i 8000-9999 -n 1)
# generate a unqiue port for each user
port=$(shuf -i 8000-9999 -n 1 --random-source <(echo "$user"))
echo -e "
Two additional steps should be perfomed on a local machine.
(1) Create an SSH tunnel in a new terminal on a local maching (there is no output):
ssh -N -L ${port}:${node}:${port} ${user}@bigpurple.nyumc.org
(2) Access Jupyter through a web browser at:
http://127.0.0.1:${port} (complete URL with token string will be shown below)
"
# clean up the environment and load modules or conda environments (should be a parameter)