yolo_web/scripts/claim.sh

27 lines
333 B
Bash
Raw Normal View History

#!/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
2023-07-05 20:47:16 +00:00
ID=$(echo $JSON | jq -r '.id')
2023-11-29 17:56:05 +00:00
bash ./scripts/train.sh "${JSON}"