Spaces:
Paused
Paused
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 | |
| WORKDIR /app | |
| # System packages required for OCR and PDF/image processing | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| tesseract-ocr-eng \ | |
| libglib2.0-0 \ | |
| libgl1 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --upgrade pip && pip install -r /app/requirements.txt | |
| COPY . /app | |
| EXPOSE 7860 | |
| # Set APP_MODULE in Space Variables, e.g. "main:app" or "app3:app" | |
| CMD ["sh", "-c", "uvicorn ${APP_MODULE:-main:app} --host 0.0.0.0 --port ${PORT}"] |