File size: 399 Bytes
687976d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | FROM python:3.10-slim
WORKDIR /app
# copy & install python deps first for layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# copy app
COPY . .
# ensure app listens on PORT env var (we used 7860 by default)
ENV PORT=7860
EXPOSE 7860
# use gunicorn to serve the Flask app: the module is app:app
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:7860", "app:app"]
|