Skip to content
Permalink
f9b8e2e936
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
30 lines (25 sloc) 695 Bytes
#!/bin/bash
#SBATCH --partition debug
#SBATCH --nodes 1
#SBATCH --ntasks-per-node 1
#SBATCH --mem-per-cpu 4G
#SBATCH --time 2-0:00:00
#SBATCH --job-name jupyter-notebook-tunnel
#SBATCH --output jupyter-notebook-tunnel-%J.log
# get tunneling info
XDG_RUNTIME_DIR=""
# port=$(shuf -i8080-8084 -n1)
port=8080
node=$(hostname -s)
ip=$(hostname -i)
user=$(whoami)
cluster=$(hostname -f)
# print tunneling instructions jupyter-log
echo -e "
CloudShell port forward command for WebPreview
gcloud compute ssh ${node} -- -A -t -l ${user} -f -N -L ${port}:${ip}:${port}
"
module load miniconda
# DON'T USE ADDRESS BELOW.
# DO USE TOKEN BELOW
jupyter-notebook --no-browser --port=${port} --ip=${ip}