-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunjupyter.sh
28 lines (21 loc) · 1.04 KB
/
runjupyter.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
XDG_RUNTIME_DIR=""
#ipnport=$(shuf -i8000-9999 -n1)
ipnport=8500
ipnip=$(hostname -i)
#module load gcc/9.1.0 julia/1.6.3 dotnet/3.1.100 cuda/11.4 matlab/2022a anaconda/2021.11
echo "Open a local terminal (on your laptop) and copy this string into it:"
echo ""
echo -e "\tssh -N -L $ipnport:$ipnip:$ipnport $(whoami)@longleaf.unc.edu"
echo ""
echo "In this local terminal enter your ONYEN password. Window will hang - that's ok."
echo ""
echo "Next copy the following url into your local web browser:"
echo ""
echo -e "\tlocalhost:$ipnport"
echo ""
echo "This will bring up jupyter in your local web browser. Log in using the jupyter notebook password you created."
echo ""
echo "When you are finished with your session and have logged out of jupyter in your local web brower be sure to return to this Longleaf terminal and type Ctrl-C (it might be necessary to do Ctrl-C repeatedly a few times). You should also do Ctrl-C back in your local terminal."
~/.conda/envs/diffusion_torch/bin/jupyter lab --no-browser --port=$ipnport --ip=$ipnip
wait