Spaces:
Running
Running
Download deploy.sh from mertkayacs/postkitty-api: direct link, hf CLI and curl.
- Browser
- Download file 983 Bytes
-
https://huggingface.co/spaces/mertkayacs/postkitty-api/resolve/main/deploy.sh
- Command line
-
hf download hf://spaces/mertkayacs/postkitty-api/deploy.sh
-
curl -L -o deploy.sh https://huggingface.co/spaces/mertkayacs/postkitty-api/resolve/main/deploy.sh
983 Bytes
| # Push this folder to the Hugging Face Space. The Space rebuilds its image and restarts. | |
| # | |
| # ./deploy.sh deploy with the engine commit already written in the Dockerfile | |
| # ./deploy.sh <commit> pin the engine to that commit of mertkayacs/postkitty, then deploy | |
| # | |
| # Needs the `hf` CLI, logged in with write access to the Space. | |
| set -eu | |
| cd "$(dirname "$0")" | |
| SPACE="${POSTKITTY_SPACE:-mertkayacs/postkitty-api}" | |
| if [ -n "${1:-}" ]; then | |
| sed -i "s/^ARG POSTKITTY_REF=.*/ARG POSTKITTY_REF=$1/" Dockerfile | |
| fi | |
| ref=$(sed -n 's/^ARG POSTKITTY_REF=//p' Dockerfile) | |
| hf upload "$SPACE" . . --type space \ | |
| --exclude ".venv/*" --exclude ".engine/*" --exclude ".pytest-tmp/*" --exclude ".pytest_cache/*" \ | |
| --exclude "*__pycache__*" \ | |
| --delete "*" \ | |
| --commit-message "deploy with engine ${ref}" | |
| echo "Pushed. Watch the build: hf spaces logs $SPACE --build" | |
| echo "Then check: curl https://$(echo "$SPACE" | tr '/' '-').hf.space/v1/health" | |