Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 | |
| # Install Tesseract + all language packs + deps | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr-all \ | |
| libtesseract-dev \ | |
| libgl1 \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set workdir | |
| WORKDIR /app | |
| # Copy requirements first (for Docker caching) | |
| COPY requirements.txt . | |
| # Install Python deps | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # Copy app | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run API | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |