Spaces:
Running
Running
# Dockerfile | |
FROM python:3.10-slim | |
# Prevent .pyc files, unbuffered logging | |
ENV PYTHONDONTWRITEBYTECODE=1 \ | |
PYTHONUNBUFFERED=1 | |
WORKDIR /app | |
# Install system deps for OCR (optional) | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
tesseract-ocr \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copy & install Python deps | |
COPY requirements.txt . | |
RUN pip install --upgrade pip && \ | |
pip install -r requirements.txt | |
# Copy application code | |
COPY app.py . | |
EXPOSE 7860 | |
CMD ["python", "app.py"] | |