FROM python:3.11-slim # Set working directory WORKDIR /app # Install system deps (for PyPDF2 and FAISS) RUN apt-get update && apt-get install -y \ build-essential \ poppler-utils \ && rm -rf /var/lib/apt/lists/* # Copy files COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . ENV HF_HOME=/tmp/huggingface # Expose port for Hugging Face Spaces EXPOSE 7860 # Run the FastAPI app CMD ["python", "qwen_app.py"]