Dockerfile.wheels.aarch64 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. FROM ubuntu:20.04 as build
  2. ENV DEBIAN_FRONTEND=noninteractive
  3. RUN apt-get -qq update \
  4. && apt-get -qq install -y \
  5. python3 \
  6. python3-dev \
  7. wget \
  8. # opencv dependencies
  9. build-essential cmake git pkg-config libgtk-3-dev \
  10. libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
  11. libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \
  12. gfortran openexr libatlas-base-dev libssl-dev\
  13. libtbb2 libtbb-dev libdc1394-22-dev libopenexr-dev \
  14. libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
  15. # scipy dependencies
  16. gcc gfortran libopenblas-dev liblapack-dev cython
  17. RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
  18. && python3 get-pip.py
  19. # need to build cmake from source because binary distribution is broken for arm64
  20. # https://github.com/scikit-build/cmake-python-distributions/issues/115
  21. # https://github.com/skvark/opencv-python/issues/366
  22. # https://github.com/scikit-build/cmake-python-distributions/issues/96#issuecomment-663062358
  23. RUN pip3 install scikit-build
  24. RUN git clone https://github.com/scikit-build/cmake-python-distributions.git \
  25. && cd cmake-python-distributions/ \
  26. && python3 setup.py bdist_wheel
  27. RUN pip3 install cmake-python-distributions/dist/*.whl
  28. RUN pip3 wheel --wheel-dir=/wheels \
  29. opencv-python-headless \
  30. numpy \
  31. imutils \
  32. scipy \
  33. psutil \
  34. Flask \
  35. paho-mqtt \
  36. PyYAML \
  37. matplotlib \
  38. click \
  39. peewee \
  40. voluptuous
  41. FROM scratch
  42. COPY --from=build /wheels /wheels