-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbodhi-positron.sh
More file actions
executable file
·46 lines (33 loc) · 946 Bytes
/
bodhi-positron.sh
File metadata and controls
executable file
·46 lines (33 loc) · 946 Bytes
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
#!/bin/bash
#BSUB -J positron
#BSUB -n 4
#BSUB -R "select[mem>20] rusage[mem=20]"
#BSUB -o logs/positron-%J.out
#BSUB -q normal
mkdir -p logs
# Get the compute node hostname
NODE_HOSTNAME=$(hostname)
cat <<END
========================================
Positron Remote SSH Connection Info
========================================
Compute node: ${NODE_HOSTNAME}
Job ID: ${LSB_JOBID}
IMPORTANT: You must be connected to the AMC VPN
CONNECT FROM POSITRON:
1. Add to your local ~/.ssh/config:
Host positron-bodhi-${LSB_JOBID}
HostName ${NODE_HOSTNAME}
User ${USER}
ProxyJump ${USER}@amc-bodhi.ucdenver.pvt
ForwardAgent yes
2. In Positron: Cmd/Ctrl+Shift+P → "Remote-SSH: Connect to Host"
Select: positron-bodhi-${LSB_JOBID}
3. Positron will install itself on the remote node automatically
When done: bkill ${LSB_JOBID}
========================================
END
# Keep the job alive
while true; do
sleep 60
done