File size: 643 Bytes
7a316cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
set -euo pipefail

PING_URL="${1:-}"
REPO_DIR="${2:-.}"

if [[ -z "${PING_URL}" ]]; then
  echo "Usage: ./validate-submission.sh <ping_url> [repo_dir]"
  exit 1
fi

cd "${REPO_DIR}"

echo "== Health =="
curl -fsS "${PING_URL%/}/health"
echo

echo "== Reset =="
curl -fsS -X POST "${PING_URL%/}/reset" \
  -H "Content-Type: application/json" \
  -d '{"difficulty":"easy"}'
echo

echo "== OpenEnv Validate =="
openenv validate --url "${PING_URL%/}"

echo "== Docker Build =="
docker build -t container-port-env .

echo "== Inference =="
python inference.py --url "${PING_URL%/}" --difficulty all

echo "Validation complete."