fix(deploy): make entrypoint.sh executable in image and git index
Andrej Janchevski
0f680ac
Files checked out from git on Linux honour the executable bit only if
git tracked it as 100755. Windows clones default to 100644 and the
HF Spaces Linux build host inherits that, so /entrypoint.sh lands
without the execute bit and the micromamba ENTRYPOINT wrapper exits
with "Permission denied" before gunicorn can start.
- COPY --chmod=0755 inside the Dockerfile so the image is correct
regardless of the source-checkout's mode.
- git update-index --chmod=+x so the file's mode is recorded as
100755 in tree, fixing future clones on any platform.
fix(deploy): harden container runtime and unify research / checkpoint roots
Andrej Janchevski
5375c2e
Multiple production-launch fixes that fall under "make the container
actually start and stay up reliably".
settings.py + Dockerfile: unify CHECKPOINTS_ROOT with RESEARCH_ROOT
(/app/research). The earlier split (CHECKPOINTS_ROOT=/app/checkpoints
on a named volume) caused a path mismatch — configs and Loader caches
live with the bundled research code under RESEARCH_ROOT, while
HF-Hub-downloaded weights landed in CHECKPOINTS_ROOT, breaking the
COINs experiment loader's lookups (e.g. configs/freebase.yml).
Snapshot_download now writes alongside the bundled tree; on paid HF
Spaces with persistent storage, override CHECKPOINTS_ROOT to /data.
Also moves the RESEARCH_ROOT definition above the sys.path additions
so the in-image /app/research path is honoured.
entrypoint.sh: switch gunicorn to one preloaded worker with four
threads and a 1800s timeout. --preload runs ModelRegistry.initialize
in the master before forking, so workers inherit a ready state via
copy-on-write and gunicorn's silen…
build(deploy): add docker image and compose for hf spaces
Andrej Janchevski
b385912
- Dockerfile: multi-stage build. Node 20 builds the Vue SPA, then a
mambaorg/micromamba runtime mirrors the local website_c env from
environment.yml + src/backend/requirements.txt (Python 3.9, rdkit
2023.03.2, boost 1.78, GPU torch+cu118 wheels). Exposes :7860 with
RESEARCH_ROOT=/app/research and CHECKPOINTS_ROOT=/app/checkpoints.
- entrypoint.sh: pre-warms huggingface_hub.snapshot_download from
bani57/checkpoints into /app/checkpoints before exec'ing gunicorn,
so worker startup never blocks on the network.
- docker-compose.yml: local-dev parity on http://localhost:7860 with a
named volume so checkpoints persist across runs. DJANGO_SECRET_KEY
is a required interpolation (${VAR:?...}) — compose fails fast if a
.env file isn't supplied.
- .env.example: template with the secrets.token_urlsafe recipe.
- .dockerignore: keeps node_modules, screenshots, datasets, local
checkpoints, .claude and plans/ out of the build context.
- .gitignore: ignore .env / build artefacts …