File size: 516 Bytes
b400ace 820448b 2ceb729 b400ace 271eaee b400ace | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # 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"] |