Spaces:
Running
Running
Download entry.sh from tkgray/tom-hermes: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/spaces/tkgray/tom-hermes/resolve/main/entry.sh
- Command line
-
hf download hf://spaces/tkgray/tom-hermes/entry.sh
-
curl -L -o entry.sh https://huggingface.co/spaces/tkgray/tom-hermes/resolve/main/entry.sh
829 Bytes
| # Restore /opt/data from the bucket (fresh volume only), start the snapshot | |
| # loop, then hand off to the image's normal s6 entrypoint dispatcher. | |
| set -e | |
| PY=/opt/hermes/.venv/bin/python | |
| if [ -n "${HF_TOKEN:-}" ]; then | |
| "$PY" /opt/bucket/bucket_sync.py restore || echo "[bucket] restore error (continuing)" | |
| # The restore runs as root, so extracted files land root-owned. Hermes runs as | |
| # `hermes` and must WRITE those databases — without this chown the log fills | |
| # with "kanban.db ... read-only for this user" and state writes fail. | |
| chown -R hermes:hermes /opt/data 2>/dev/null || echo "[bucket] chown skipped" | |
| else | |
| echo "[bucket] HF_TOKEN unset — persistence disabled" | |
| fi | |
| if [ -n "${HF_TOKEN:-}" ]; then | |
| "$PY" /opt/bucket/bucket_sync.py loop & | |
| fi | |
| exec /opt/hermes/docker/entrypoint-dispatch.sh "$@" | |