25 lines
533 B
Docker
25 lines
533 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# System deps for invisible-watermark (opencv/pillow) handling
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY app.py .
|
|
|
|
EXPOSE 8000
|
|
|
|
# Command to run the app in production with Gunicorn
|
|
CMD ["gunicorn", "--workers", "4", "--bind", "0.0.0.0:8000", "app:app"]
|
|
|