Spaces:
Sleeping
Sleeping
File size: 775 Bytes
f996a9b | 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 29 30 31 32 33 | # Use the official Python image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Install system dependencies (Poppler for PDF, libgl1 for OpenCV)
RUN apt-get update && apt-get install -y \
poppler-utils \
libgl1 \
libglib2.0-0 \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt \
fastapi uvicorn python-multipart sse-starlette
# Copy the rest of the application
COPY . .
# Create directory for models
RUN mkdir -p models
# Expose port 7860 (Hugging Face Spaces default port)
EXPOSE 7860
# Run Streamlit by default on port 7860
CMD ["streamlit", "run", "webui.py", "--server.port=7860", "--server.address=0.0.0.0"]
|