Skip to content

Commit 899dd6c

Browse files
committed
update
1 parent 6ded186 commit 899dd6c

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

cpu/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ RUN \
2121
# add sources for older pythons
2222
apt-get update -q --fix-missing && \
2323
apt-get install -y --no-install-recommends software-properties-common && \
24-
if [[ "$PYTHON_VERSION" =~ ^(3.7|3.12)$ ]]; then \
25-
add-apt-repository ppa:deadsnakes/ppa ; \
26-
fi && \
24+
add-apt-repository ppa:deadsnakes/ppa && \
2725
apt-add-repository universe && \
2826
apt-get -y update -qq --fix-missing && \
2927
apt-get -y install --no-install-recommends \
@@ -54,7 +52,6 @@ RUN \
5452
unzip \
5553
cmake \
5654
ffmpeg \
57-
$( [ "$UBUNTU_VERSION" = "20.04" ] && libtbb2 || libtbb12 ) \
5855
gfortran \
5956
apt-utils \
6057
pkg-config \
@@ -110,8 +107,8 @@ RUN \
110107
-D BUILD_TESTS=OFF \
111108
-D CMAKE_INSTALL_PREFIX=/usr/local \
112109
-D OPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules \
113-
-D BUILD_opencv_python3=$( [ ${PYTHON_VERSION%%.*} -ge 3 ] && echo "ON" || echo "OFF" ) \
114-
-D BUILD_opencv_python2=$( [ ${PYTHON_VERSION%%.*} -lt 3 ] && echo "ON" || echo "OFF" ) \
110+
-D BUILD_opencv_python3=ON \
111+
-D BUILD_opencv_python2=OFF \
115112
-D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \
116113
-D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \
117114
-D BUILD_EXAMPLES=OFF \

gpu/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ RUN \
2727
# add sources for older pythons
2828
apt-get update -qq --fix-missing && \
2929
apt-get install -y --no-install-recommends software-properties-common && \
30-
if [[ "$PYTHON_VERSION" =~ ^(3.7|3.12)$ ]]; then \
31-
add-apt-repository ppa:deadsnakes/ppa ; \
32-
fi && \
30+
add-apt-repository ppa:deadsnakes/ppa && \
3331
apt-add-repository universe && \
3432
apt-get -y update -qq --fix-missing && \
3533
apt-get -y install --no-install-recommends \
3634
python${PYTHON_VERSION} \
3735
python${PYTHON_VERSION}-dev \
38-
$( [ ${PYTHON_VERSION%%.*} -ge 3 ] && echo "python${PYTHON_VERSION}-distutils" ) \
36+
python${PYTHON_VERSION}-distutils \
3937
curl \
4038
wget \
4139
&& \
@@ -67,7 +65,6 @@ RUN \
6765
unzip \
6866
cmake \
6967
ffmpeg \
70-
$( [ "$UBUNTU_VERSION" = "20.04" ] && libtbb2 || libtbb12 ) \
7168
gfortran \
7269
apt-utils \
7370
pkg-config \
@@ -123,8 +120,8 @@ RUN \
123120
-D BUILD_TESTS=OFF \
124121
-D CMAKE_INSTALL_PREFIX=/usr/local \
125122
-D OPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules \
126-
-D BUILD_opencv_python3=$( [ ${PYTHON_VERSION%%.*} -ge 3 ] && echo "ON" || echo "OFF" ) \
127-
-D BUILD_opencv_python2=$( [ ${PYTHON_VERSION%%.*} -lt 3 ] && echo "ON" || echo "OFF" ) \
123+
-D BUILD_opencv_python3=ON \
124+
-D BUILD_opencv_python2=OFF \
128125
-D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \
129126
-D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \
130127
-D BUILD_EXAMPLES=OFF \

0 commit comments

Comments
 (0)