Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| # System dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| default-jdk \ | |
| poppler-utils \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python deps (cached layer) | |
| COPY backend/requirements.txt backend/requirements.txt | |
| COPY backend/requirements-pipeline.txt backend/requirements-pipeline.txt | |
| RUN pip install --no-cache-dir \ | |
| -r backend/requirements.txt \ | |
| -r backend/requirements-pipeline.txt \ | |
| huggingface_hub | |
| # Copy source code | |
| COPY backend/ backend/ | |
| COPY pdf-script/ pdf-script/ | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| # HF Spaces runs on port 7860 | |
| EXPOSE 7860 | |
| CMD ["/start.sh"] | |