From 1fe4ee36eec1417241b99b69baa99de67dc644a6 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Thu, 16 Jan 2025 23:20:44 +0900 Subject: [PATCH 01/10] bump: build OpenCV `4.11` --- .github/workflows/docker-builds.yml | 18 +++++++++--------- README.md | 4 ++-- cpu/Dockerfile | 2 +- gpu/Dockerfile | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-builds.yml b/.github/workflows/docker-builds.yml index 4103fa7..da43ba6 100644 --- a/.github/workflows/docker-builds.yml +++ b/.github/workflows/docker-builds.yml @@ -19,18 +19,18 @@ jobs: matrix: ubuntu_version: ["22.04"] python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] - opencv_version: ["4.10.0"] + opencv_version: ["4.11.0"] device: ["cpu", "gpu"] cuda_version: ["12.4.1"] include: - - { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.10.0", device: "cpu" } - - { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.10.0", device: "cpu" } - #- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.10.0", device: "cpu" } - - { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.10.0", device: "cpu" } - - { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" } - - { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" } - #- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" } - - { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" } + - { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.11.0", device: "cpu" } + - { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.11.0", device: "cpu" } + #- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.11.0", device: "cpu" } + - { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.11.0", device: "cpu" } + - { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.11.0", device: "gpu", cuda_version: "12.8.0" } + - { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.11.0", device: "gpu", cuda_version: "12.8.0" } + #- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.11.0", device: "gpu", cuda_version: "12.8.0" } + - { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.11.0", device: "gpu", cuda_version: "12.8.0" } steps: - name: Checkout uses: actions/checkout@v4 diff --git a/README.md b/README.md index d59fa75..9ce36ab 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Repository for clean Dockerfile containing [FFmpeg](https://www.ffmpeg.org/), [O ## Tags -- `:cpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.10.x, FFmpeg -- `:gpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.10.x, FFmpeg with CUDA 12.x support +- `:cpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.11.x, FFmpeg +- `:gpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.11.x, FFmpeg with CUDA 12.x support ## Build diff --git a/cpu/Dockerfile b/cpu/Dockerfile index ca8891f..0ed3bc0 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -8,7 +8,7 @@ FROM ubuntu:${UBUNTU_VERSION} LABEL maintainer="https://github.com/Borda" ARG PYTHON_VERSION="3.9" -ARG OPENCV_VERSION="4.10.0" +ARG OPENCV_VERSION="4.11.0" # Needed for string substitution SHELL ["/bin/bash", "-c"] diff --git a/gpu/Dockerfile b/gpu/Dockerfile index 43e329e..693aa4b 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -13,7 +13,7 @@ FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION} LABEL maintainer="https://github.com/Borda" ARG PYTHON_VERSION="3.9" -ARG OPENCV_VERSION="4.10.0" +ARG OPENCV_VERSION="4.11.0" # Needed for string substitution SHELL ["/bin/bash", "-c"] From 45e055dc692e5098288d9957e68955ac4f349054 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 24 Feb 2025 11:37:43 +0100 Subject: [PATCH 02/10] Empty-Commit From 6b627bb9ec0d788f5f37760b19b5c9d12e8772a1 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 19 Mar 2025 20:39:41 +0100 Subject: [PATCH 03/10] libgtk-3-dev --- cpu/Dockerfile | 7 +++++-- gpu/Dockerfile | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 0ed3bc0..565647e 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -77,7 +77,9 @@ RUN \ zlib1g-dev \ libsm6 \ libxext6 \ - libxrender1 && \ + libxrender1 \ + libgtk-3-dev \ + && \ pip install numpy && \ # Install OpenCV wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip -O opencv.zip --progress=bar:force:noscroll --no-check-certificate && \ @@ -146,7 +148,8 @@ RUN \ libglew-dev \ libpostproc-dev \ libeigen3-dev \ - zlib1g-dev && \ + zlib1g-dev \ + && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /opencv /opencv_contrib /var/lib/apt/lists/* diff --git a/gpu/Dockerfile b/gpu/Dockerfile index 693aa4b..cc6277d 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -89,6 +89,7 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ + libgtk-3-dev \ && \ pip install numpy && \ # Install OpenCV From 15ff3184b617835090925df62c802a1547225794 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 24 Mar 2025 09:27:43 +0100 Subject: [PATCH 04/10] glut --- cpu/Dockerfile | 3 +++ gpu/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 565647e..3590f2d 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -79,6 +79,9 @@ RUN \ libxext6 \ libxrender1 \ libgtk-3-dev \ + freeglut3-dev \ + libgl1-mesa-dev \ + libglu1-mesa-de \ && \ pip install numpy && \ # Install OpenCV diff --git a/gpu/Dockerfile b/gpu/Dockerfile index cc6277d..13d64b0 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -90,6 +90,9 @@ RUN \ libxext6 \ libxrender1 \ libgtk-3-dev \ + freeglut3-dev \ + libgl1-mesa-dev \ + libglu1-mesa-de \ && \ pip install numpy && \ # Install OpenCV From 89bfc9737dbf6224469d96153675ff6388bbb300 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 24 Mar 2025 10:09:58 +0100 Subject: [PATCH 05/10] libglu1-mesa-de --- cpu/Dockerfile | 1 - gpu/Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 3590f2d..cf32aab 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -81,7 +81,6 @@ RUN \ libgtk-3-dev \ freeglut3-dev \ libgl1-mesa-dev \ - libglu1-mesa-de \ && \ pip install numpy && \ # Install OpenCV diff --git a/gpu/Dockerfile b/gpu/Dockerfile index 13d64b0..4edfe0a 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -92,7 +92,6 @@ RUN \ libgtk-3-dev \ freeglut3-dev \ libgl1-mesa-dev \ - libglu1-mesa-de \ && \ pip install numpy && \ # Install OpenCV From 99c850bbcb8360f6aa4961fa46ac5d8cfd16828b Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 24 Mar 2025 12:29:04 +0100 Subject: [PATCH 06/10] -D WITH_OPENGL=OFF --- cpu/Dockerfile | 4 +--- gpu/Dockerfile | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index cf32aab..8062751 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -78,9 +78,6 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ - libgtk-3-dev \ - freeglut3-dev \ - libgl1-mesa-dev \ && \ pip install numpy && \ # Install OpenCV @@ -108,6 +105,7 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ + -D WITH_OPENGL=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ diff --git a/gpu/Dockerfile b/gpu/Dockerfile index 4edfe0a..da64c2a 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -89,9 +89,6 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ - libgtk-3-dev \ - freeglut3-dev \ - libgl1-mesa-dev \ && \ pip install numpy && \ # Install OpenCV @@ -119,6 +116,7 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ + -D WITH_OPENGL=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ From 8ec693886a170b9fd895dfd02f708795622688bc Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 26 Mar 2025 09:46:07 +0100 Subject: [PATCH 07/10] libqt5x11extras5-dev --- cpu/Dockerfile | 5 +++-- gpu/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 8062751..6aa4ce8 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -53,7 +53,9 @@ RUN \ apt-utils \ pkg-config \ checkinstall \ - qtbase5-dev qt5-qmake \ + qtbase5-dev \ + qt5-qmake \ + libqt5x11extras5-dev \ build-essential \ liblapack-dev \ libatlas-base-dev \ @@ -105,7 +107,6 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ - -D WITH_OPENGL=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ diff --git a/gpu/Dockerfile b/gpu/Dockerfile index da64c2a..17cb05a 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -64,7 +64,9 @@ RUN \ apt-utils \ pkg-config \ checkinstall \ - qtbase5-dev qt5-qmake \ + qtbase5-dev \ + qt5-qmake \ + libqt5x11extras5-dev \ build-essential \ liblapack-dev \ libatlas-base-dev \ @@ -116,7 +118,6 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ - -D WITH_OPENGL=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ From f871b6b112508b039ca248eed4458792c91ae990 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 26 Mar 2025 10:00:12 +0100 Subject: [PATCH 08/10] libgtk-3-dev --- cpu/Dockerfile | 2 +- gpu/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 6aa4ce8..de9c19e 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -55,7 +55,6 @@ RUN \ checkinstall \ qtbase5-dev \ qt5-qmake \ - libqt5x11extras5-dev \ build-essential \ liblapack-dev \ libatlas-base-dev \ @@ -80,6 +79,7 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ + libgtk-3-dev \ && \ pip install numpy && \ # Install OpenCV diff --git a/gpu/Dockerfile b/gpu/Dockerfile index 17cb05a..f4dd065 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -66,7 +66,6 @@ RUN \ checkinstall \ qtbase5-dev \ qt5-qmake \ - libqt5x11extras5-dev \ build-essential \ liblapack-dev \ libatlas-base-dev \ @@ -91,6 +90,7 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ + libgtk-3-dev \ && \ pip install numpy && \ # Install OpenCV From c0ecacb45675b33ed350d177cb99be46d6606fbd Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 26 Mar 2025 10:23:38 +0100 Subject: [PATCH 09/10] BUILD_opencv_highgui=OFF --- cpu/Dockerfile | 2 +- gpu/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index de9c19e..3d99350 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -79,7 +79,6 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ - libgtk-3-dev \ && \ pip install numpy && \ # Install OpenCV @@ -107,6 +106,7 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ + -D BUILD_opencv_highgui=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ diff --git a/gpu/Dockerfile b/gpu/Dockerfile index f4dd065..f78752c 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -90,7 +90,6 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ - libgtk-3-dev \ && \ pip install numpy && \ # Install OpenCV @@ -118,6 +117,7 @@ RUN \ -D PYTHON${PYTHON_VERSION%%.*}_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D PYTHON_DEFAULT_EXECUTABLE=$(which python${PYTHON_VERSION}) \ -D BUILD_EXAMPLES=OFF \ + -D BUILD_opencv_highgui=OFF \ -D WITH_IPP=OFF \ -D WITH_FFMPEG=ON \ -D WITH_GSTREAMER=ON \ From e2a39191f0840a0115dd47c3f209e6e561adf1ad Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 26 Mar 2025 10:52:36 +0100 Subject: [PATCH 10/10] libwebpmux3 libwebpdemux2 --- cpu/Dockerfile | 2 ++ gpu/Dockerfile | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cpu/Dockerfile b/cpu/Dockerfile index 3d99350..b85c212 100644 --- a/cpu/Dockerfile +++ b/cpu/Dockerfile @@ -79,6 +79,8 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ + libwebpmux3 \ + libwebpdemux2 \ && \ pip install numpy && \ # Install OpenCV diff --git a/gpu/Dockerfile b/gpu/Dockerfile index f78752c..0141536 100644 --- a/gpu/Dockerfile +++ b/gpu/Dockerfile @@ -90,6 +90,8 @@ RUN \ libsm6 \ libxext6 \ libxrender1 \ + libwebpmux3 \ + libwebpdemux2 \ && \ pip install numpy && \ # Install OpenCV