2020-09-28 13:56:24 +02:00
|
|
|
FROM ubuntu:20.04 as build
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN apt-get -qq update \
|
|
|
|
&& apt-get -qq install -y \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
wget \
|
|
|
|
# opencv dependencies
|
|
|
|
build-essential cmake git pkg-config libgtk-3-dev \
|
|
|
|
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
|
|
|
|
libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \
|
|
|
|
gfortran openexr libatlas-base-dev libssl-dev\
|
|
|
|
libtbb2 libtbb-dev libdc1394-22-dev libopenexr-dev \
|
|
|
|
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
|
|
|
|
# scipy dependencies
|
|
|
|
gcc gfortran libopenblas-dev liblapack-dev cython
|
|
|
|
|
|
|
|
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
|
2021-01-17 15:18:54 +01:00
|
|
|
&& python3 get-pip.py "pip==20.2.4"
|
2020-09-28 13:56:24 +02:00
|
|
|
|
|
|
|
RUN pip3 install scikit-build
|
|
|
|
|
|
|
|
RUN pip3 wheel --wheel-dir=/wheels \
|
|
|
|
opencv-python-headless \
|
2021-01-19 13:16:44 +01:00
|
|
|
# pinning due to issue in 1.19.5 https://github.com/numpy/numpy/issues/18131
|
|
|
|
numpy==1.19.4 \
|
2020-09-28 13:56:24 +02:00
|
|
|
imutils \
|
|
|
|
scipy \
|
|
|
|
psutil \
|
|
|
|
Flask \
|
|
|
|
paho-mqtt \
|
|
|
|
PyYAML \
|
|
|
|
matplotlib \
|
2021-01-17 02:56:21 +01:00
|
|
|
click \
|
|
|
|
setproctitle \
|
2021-02-14 16:27:18 +01:00
|
|
|
peewee \
|
|
|
|
gevent
|
2020-09-28 13:56:24 +02:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
COPY --from=build /wheels /wheels
|