-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjupyter.sh
More file actions
48 lines (37 loc) · 1.12 KB
/
jupyter.sh
File metadata and controls
48 lines (37 loc) · 1.12 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
#SBATCH --partition regular,long7,long30
#SBATCH --nodes 1
#SBATCH --ntasks-per-node 1
#SBATCH --mem-per-cpu 4G
#SBATCH --job-name jupyter-notebook
#SBATCH --output jupyter_notebook.%A.log
# get tunneling info
XDG_RUNTIME_DIR=""
port=$(shuf -i8000-9999 -n1)
node=$(hostname -s)
user=$(whoami)
cluster=$(hostname -f)
date
/programs/bin/labutils/mount_server cbsubscb18 /storage
# print tunneling instructions jupyter-log
echo -e "
MacOS or linux terminal command to create your ssh tunnel:
ssh -L ${port}:${node}:${port} ${user}@${cluster}
For more info and how to connect from windows,
see research.computing.yale.edu/jupyter-nb
Here is the MobaXterm info:
Forwarded port:same as remote port
Remote server: ${node}
Remote port: ${port}
SSH server: ${cluster}.biohpc.cornell.edu
SSH login: $user
SSH port: 22
Use a Browser on your local machine to go to:
localhost:${port} (prefix w/ https:// if using password)
"
source ~/.bashrc
module load python/3.10.6-r9
#python -m ipykernel install --user --name=sciComp
# DON'T USE ADDRESS BELOW.
# DO USE TOKEN BELOW
jupyter notebook --no-browser --port=${port} --ip=${node}