# Use lightweight Python image FROM python:3.10-slim # Set working directory WORKDIR /app # Copy dependency file and install COPY requirements.txt . RUN apt-get update && apt-get install -y \ poppler-utils \ libgl1 \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir -r requirements.txt # Copy your FastAPI app COPY . . # Expose the port that Hugging Face expects EXPOSE 7860 # Start FastAPI with uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]