File size: 901 Bytes
b496a3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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"]