24 lines
300 B
Bash
24 lines
300 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if [ -f .env ]; then
|
|
source .env
|
|
fi
|
|
|
|
if [ -z ${1} ]; then
|
|
echo "Please provide a job"
|
|
exit 1
|
|
fi
|
|
|
|
JOB="${1}"
|
|
|
|
JSON=$(curl -s -X POST "${YOLO_WEB_URL}/job/claim/${JOB}")
|
|
|
|
if [[ "${JSON}" != *"{"* ]]; then
|
|
echo ERROR
|
|
echo "${JSON}"
|
|
exit 1
|
|
fi
|
|
|
|
bash ./scripts/train.sh "${JSON}" |