Fix paths, improve error handling

This commit is contained in:
Christoph Hagen 2022-03-21 20:17:51 +01:00
parent 06f013bc5c
commit c511593594

12
Training/train.sh Normal file → Executable file
View File

@ -27,7 +27,7 @@
########### PATHS ######################################################################
WORK_DIR="~/Projects/CapCollectorServer/Training"
WORK_DIR="${HOME}/Projects/CapCollectorServer/Training"
BACKUP_DIR="${WORK_DIR}/backup"
IMAGE_DIR="${WORK_DIR}/images"
VERSION_FILE="${WORK_DIR}/classifier.version"
@ -36,12 +36,18 @@ MODEL_FILE="${WORK_DIR}/classifier.mlmodel"
TRAINING_ITERATIONS="17"
SSH_PORT="5432"
SERVER="pi@pi4"
SERVER_ROOT_PATH="/data/public/capserver"
SERVER_ROOT_PATH="/data/servers/caps/Public"
########################################################################################
echo "[INFO] Working in directory ${WORK_DIR}"
cd ${WORK_DIR}
cd $WORK_DIR
retVal=$?
if [ $retVal -ne 0 ]; then
echo '[ERROR] Directory not found'
return $retVal
fi
echo "[INFO] Getting classifier version from server..."
scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR