File size: 1,170 Bytes
62b83b2
 
 
 
8f09f6a
62b83b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5f2c4b
 
62b83b2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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"]