Download deploy/start.sh from Gaurav711/HyperFlow: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/Gaurav711/HyperFlow/resolve/main/deploy/start.sh
- Command line
-
hf download hf://spaces/Gaurav711/HyperFlow/deploy/start.sh
-
curl -L -o start.sh https://huggingface.co/spaces/Gaurav711/HyperFlow/resolve/main/deploy/start.sh
556 Bytes
| # Container entrypoint: migrate, then run the worker and the API together. If either process | |
| # exits, stop the other and exit non-zero so the platform restarts the container. | |
| set -eu | |
| python -m backend.flagship.manage migrate | |
| python -m backend.flagship.worker & | |
| worker=$! | |
| uvicorn backend.api.main:app --host 0.0.0.0 --port "${PORT:-7860}" --no-access-log & | |
| api=$! | |
| trap 'kill "$worker" "$api" 2>/dev/null' TERM INT | |
| while kill -0 "$worker" 2>/dev/null && kill -0 "$api" 2>/dev/null; do sleep 5; done | |
| kill "$worker" "$api" 2>/dev/null || true | |
| exit 1 | |