-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingularity_check.sh
More file actions
33 lines (20 loc) · 1.12 KB
/
singularity_check.sh
File metadata and controls
33 lines (20 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
#! /usr/bin/env bash
PASSWORD=${singularity exec instance://rserver bash -c 'echo $PASSWORD'}
PORT=${singularity exec instance://rserver bash -c 'echo $PORT'}
SERVER_URL=${singularity exec instance://rserver bash -c 'echo $SERVER_URL'}
SSH_COMMAND=${singularity exec instance://rserver bash -c 'echo ssh -N -L 8787:${HOSTNAME}:${PORT} ${USER}@${HOSTNAME}'}
echo "
1. SSH tunnel from your workstation using the following command:
ssh -N -L 8787:${SERVER_URL}:${PORT} ${USER}@${SERVER_URL}
and point your web browser to http://localhost:8787
2. log in to RStudio Server using the following credentials:
user: ${USER}
password: ${PASSWORD}
When done using RStudio Server, terminate the job by:
1. Exit the RStudio Session ("power" button in the top right corner of the RStudio window)
2. Issue the following command on the login node:
singularity instance stop rserver
"
# Check logs at
# cat /user/adamw/.singularity/instances/logs/srv-v15-25.cbls.ccr.buffalo.edu/adamw/rserver.out
# cat /user/adamw/.singularity/instances/logs/srv-v15-25.cbls.ccr.buffalo.edu/adamw/rserver.err