FROM ubuntu:22.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get install -y build-essential && apt-get install -y libopencv-dev && apt-get install -y python3.10 python3-pip | |
#FROM python:3.9 | |
WORKDIR /hab | |
COPY ./app . | |
RUN pip3 install -r requirements.txt | |
ENV MPLCONFIGDIR=/tmp/MPLCONFIGDIR/ | |
ENV DOCTR_CACHE_DIR=/tmp/DOCTR/ | |
ENV YOLO_CONFIG_DIR=/tmp/YOLO | |
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "240", "app:app"] | |