| # Hugging Face Space (Docker SDK) build for the ChatDocs main server. | |
| # Rename this file to `Dockerfile` in the Space repo (HF builds the file named | |
| # exactly "Dockerfile" at the repo root). | |
| FROM python:3.9 | |
| WORKDIR /app | |
| COPY . /app | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # HF Spaces expose port 7860 by default (see app_port in README.md). | |
| ENV PORT=7860 | |
| # Single-container demo defaults (override in Space "Variables and secrets"): | |
| # USE_RABBITMQ=false -> ingest PDFs synchronously, no queue/worker | |
| # UPLOAD_DIR=/tmp/uploads -> writable on HF (the rest of the FS is read-mostly) | |
| # DISABLE_ORIGIN_CHECK=true-> allow testing /query from Swagger UI | |
| ENV USE_RABBITMQ=false | |
| ENV UPLOAD_DIR=/tmp/uploads | |
| ENV DISABLE_ORIGIN_CHECK=true | |
| RUN mkdir -p /tmp/uploads && chmod 777 /tmp/uploads | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |