-
Notifications
You must be signed in to change notification settings - Fork 4
/
start_keck_viewers
executable file
·37 lines (31 loc) · 1.33 KB
/
start_keck_viewers
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
#!/bin/bash -i
# If we're using conda python
CONDAEXE=$(which conda)
echo "CONDAEXE: $CONDAEXE"
if [ "$CONDAEXE" != "" ]; then
CONDA_BASE=$(conda info --base)
echo "CONDA_BASE: $CONDA_BASE"
source $CONDA_BASE/etc/profile.d/conda.sh
KROLINE=$(conda info --envs | grep KRO)
echo "KROLINE: $KROLINE"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "DIR: $DIR"
if [ "$KROLINE" != "" ]; then
echo "Launching using conda KRO environment"
conda activate KRO
else
echo "Launching using conda current environment"
fi
python3 $DIR/keck_vnc_launcher.py -c $DIR/local_config.yaml $@
else
echo "We are unable to determine the correct python version to run the"
echo "Remote Observing software. We will now try a generic python3 call,"
echo "if this fails, simply execute the keck_vnc_launcher.py file using the"
echo "correct python version for your system and use the same arguments you"
echo "would use with the start_keck_viewers script. For example:"
echo " /path/to/python3 keck_vnc_launcher.py numbered_account"
echo "Of course, you should use the proper path to your python executable"
echo "and the correct numbered account."
# just try whatever is in the path and hope it works
python3 keck_vnc_launcher.py $@
fi