Spaces:
Configuration error
Configuration error
| FROM python:3.11-slim | |
| # System deps: Tesseract, OpenCV headless libs, poppler | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| tesseract-ocr-hin \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| libgl1 \ | |
| zbar-tools \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Non-root user | |
| RUN useradd -m appuser && chown -R appuser /app | |
| USER appuser | |
| EXPOSE 8000 | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| API_KEYS=demo-key-12345 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"] | |