Skip to content

Commit 50f156d

Browse files
handfluchtjanza
authored andcommitted
Updated python and opencv
1 parent d94e10f commit 50f156d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM python:3.7
2-
MAINTAINER Josip Janzic <josip@jjanzic.com>
1+
FROM python:3.9
2+
LABEL mantainer="Josip Janzic <josip@jjanzic.com>"
33

44
RUN apt-get update \
55
&& apt-get install -y \
@@ -23,7 +23,7 @@ RUN apt-get update \
2323
RUN pip install numpy
2424

2525
WORKDIR /
26-
ENV OPENCV_VERSION="4.1.1"
26+
ENV OPENCV_VERSION="4.5.0"
2727
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip \
2828
&& unzip ${OPENCV_VERSION}.zip \
2929
&& mkdir /opencv-${OPENCV_VERSION}/cmake_binary \
@@ -40,14 +40,14 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip \
4040
-DBUILD_TESTS=OFF \
4141
-DBUILD_PERF_TESTS=OFF \
4242
-DCMAKE_BUILD_TYPE=RELEASE \
43-
-DCMAKE_INSTALL_PREFIX=$(python3.7 -c "import sys; print(sys.prefix)") \
44-
-DPYTHON_EXECUTABLE=$(which python3.7) \
45-
-DPYTHON_INCLUDE_DIR=$(python3.7 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
46-
-DPYTHON_PACKAGES_PATH=$(python3.7 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
43+
-DCMAKE_INSTALL_PREFIX=$(python3.9 -c "import sys; print(sys.prefix)") \
44+
-DPYTHON_EXECUTABLE=$(which python3.9) \
45+
-DPYTHON_INCLUDE_DIR=$(python3.9 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
46+
-DPYTHON_PACKAGES_PATH=$(python3.9 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
4747
.. \
4848
&& make install \
4949
&& rm /${OPENCV_VERSION}.zip \
5050
&& rm -r /opencv-${OPENCV_VERSION}
5151
RUN ln -s \
52-
/usr/local/python/cv2/python-3.7/cv2.cpython-37m-x86_64-linux-gnu.so \
53-
/usr/local/lib/python3.7/site-packages/cv2.so
52+
/usr/local/python/cv2/python-3.9/cv2.cpython-37m-x86_64-linux-gnu.so \
53+
/usr/local/lib/python3.9/site-packages/cv2.so

0 commit comments

Comments
 (0)