# 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"]