file_extension_change / Dockerfile
euler314's picture
Update Dockerfile
ff1f350 verified
raw
history blame contribute delete
521 Bytes
# 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"]