File size: 457 Bytes
48bc30e 0da364f 48bc30e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
FROM python:3.12-slim
WORKDIR /app
ENV FLASK_APP=main.py
ENV FLASK_ENV=production
ENV PORT=7860
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV YOLO_CONFIG_DIR=/tmp/Ultralytics
RUN apt-get update && apt-get install -y \
libopencv-dev \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python","-m","gevent.pywsgi","-b","0.0.0.0:7860","main:app"] |