Spaces:
Sleeping
Sleeping
File size: 666 Bytes
35fbb15 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Docent AI — container image for free deployment (Hugging Face Spaces / Render / Fly.io)
FROM python:3.11-slim
WORKDIR /app
# Install Python dependencies first (better layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the whole project (includes the pre-built vector_db/ and images/)
COPY . .
# These dirs must exist at startup: StaticFiles mounts images/, and uploads
# write into documents/ + vector_db/.
RUN mkdir -p documents images vector_db
# Hugging Face Spaces expects the app on port 7860 by default.
EXPOSE 7860
WORKDIR /app/backend
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|