-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy
executable file
·37 lines (33 loc) · 983 Bytes
/
deploy
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
# Distinct deployment servers
# - gpu
# - cal-im
# - cr
# Distinct environments
# - deployment -- reliable, tested
# - development -- testing
# setup
NAME="lwa-antpos"
DATE=$(date --iso-8601=seconds)
LOG=~/deploy_${NAME}_${DATE}.log
set -ex >> $LOG 2>>$LOG
rm ~/deploy_$NAME_*.log >> $LOG 2>>$LOG # clean up old logs
echo $HOSTNAME >> $LOG 2>>$LOG # should be installing on calim
echo $PWD >> $LOG 2>>$LOG # should be base of code repo
whoami >> $LOG 2>>$LOG # should be user pipeline (or ubuntu?)
if [[ $PWD =~ $NAME ]]; then
if [[ $HOSTNAME =~ 'calim' ]]; then
echo "$DATE" >> $LOG 2>>$LOG
conda run -n deployment which python >> $LOG 2>>$LOG
if [[ $? == 0 ]]; then
conda run -n deployment git describe >> $LOG 2>>$LOG
fi
if [[ $? == 0 ]]; then
conda run -n deployment pip install . >> $LOG 2>>$LOG
fi
else
echo "Not installing on this host" >> $LOG 2>>$LOG
fi
else
echo "Not installing in this location" >> $LOG 2>>$LOG
fi