Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim AS builder | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --prefix=/install -r requirements.txt | |
| FROM python:3.11-slim AS runner | |
| WORKDIR /app | |
| ENV PORT=7860 | |
| RUN apt-get update && apt-get install -y --no-install-recommends tesseract-ocr && rm -rf /var/lib/apt/lists/* | |
| COPY --from=builder /install /usr/local | |
| COPY . . | |
| RUN mkdir -p output && useradd -m -u 1000 appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| EXPOSE 7860 | |
| CMD ["python", "main.py"] | |