Download code/scripts/dev_server.sh from changh95/METEOR-2-p150: direct link, hf CLI and curl.
- Browser
- Download file 743 Bytes
-
https://huggingface.co/changh95/METEOR-2-p150/resolve/main/code/scripts/dev_server.sh
- Command line
-
hf download hf://changh95/METEOR-2-p150/code/scripts/dev_server.sh
-
curl -L -o dev_server.sh https://huggingface.co/changh95/METEOR-2-p150/resolve/main/code/scripts/dev_server.sh
743 Bytes
| # Inside the image (bin/devrun bash scripts/dev_server.sh gather): serve the app with uvicorn on 127.0.0.1:20000, | |
| # run the package smoke test against it, stop the server with SIGTERM (its lifespan closes the device). | |
| set -u | |
| variant="${1:-gather}" | |
| export METEOR2_VARIANT="$variant" METEOR2_WEIGHTS_DIR=/weights | |
| cd /work | |
| python -m uvicorn --host 127.0.0.1 --port 20000 --lifespan on tt_meteor2.server.app:app >/logs/dev_server_$variant.log 2>&1 & | |
| pid=$! | |
| python3 tt_meteor2/server/smoke_test.py --url http://127.0.0.1:20000 --wait 900 --out /logs/dev_server_$variant.json \ | |
| --reference tt_meteor2/samples/synthetic_8cam.$variant.reference.json | |
| rc=$? | |
| kill -TERM $pid | |
| wait $pid | |
| tail -5 /logs/dev_server_$variant.log | |
| exit $rc | |