Spaces:
Runtime error
Runtime error
| # Antaram on a Hugging Face Docker Space (Linux). Behind Cloudflare → your domain. | |
| FROM python:3.12-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl ca-certificates && rm -rf /var/lib/apt/lists/* | |
| # HF Spaces run as uid 1000. | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| # Install the Antigravity CLI (Linux build). | |
| RUN curl -fsSL https://antigravity.google/cli/install.sh | sh | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user app ./app | |
| COPY --chown=user start.sh . | |
| # Ephemeral paths (HF free tier has no persistent disk; Postgres holds the durable data). | |
| ENV ANTARAM_HOMES=/tmp/antaram_homes \ | |
| ATTACH_TMP_DIR=/tmp \ | |
| AGY_BIN=/home/user/.local/bin/agy \ | |
| REQUIRE_API_KEY=true | |
| # Secrets to set in the HF Space UI (NOT here): | |
| # DATABASE_URL, SUPERADMIN_PASSWORD, AGY_CREDS_JSON, AGY_CREDS_PATH | |
| # CONSOLE_PATH -> long, unguessable slug for the admin-only chat console | |
| # (the console is served ONLY at /<CONSOLE_PATH>, never at /) | |
| EXPOSE 7860 | |
| CMD ["bash", "start.sh"] | |