docker: update OpenCV containers to 4.12.0

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2025-07-04 20:01:08 +02:00
committed by Ron Evans
parent 33924d2dde
commit 3083f8f724
15 changed files with 95 additions and 95 deletions

View File

@@ -52,7 +52,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
image: tonistiigi/binfmt:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out the repo
@@ -62,8 +62,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0
gocv/opencv:4.12.0
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0
tags: |
type=sha,format=long
type=raw,value=latest
@@ -87,9 +87,9 @@ jobs:
push: true
tags: |
gocv/opencv:latest
gocv/opencv:4.11.0
gocv/opencv:4.12.0
ghcr.io/${{ github.repository_owner }}/opencv:latest
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -136,7 +136,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28
image: tonistiigi/binfmt:latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check out the repo
@@ -146,8 +146,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-static
gocv/opencv:4.12.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-static
tags: |
type=sha,format=long
type=raw,value=latest
@@ -170,8 +170,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-static
gocv/opencv:4.12.0-static
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-static
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -224,8 +224,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-gpu-cuda-11
gocv/opencv:4.12.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-gpu-cuda-11
tags: |
type=sha,format=long
type=raw,value=latest
@@ -248,8 +248,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-gpu-cuda-11
gocv/opencv:4.12.0-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-gpu-cuda-11
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -302,8 +302,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-gpu-cuda-11.2.2
gocv/opencv:4.12.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-gpu-cuda-11.2.2
tags: |
type=sha,format=long
type=raw,value=latest
@@ -326,8 +326,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-gpu-cuda-11.2.2
gocv/opencv:4.12.0-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-gpu-cuda-11.2.2
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -380,8 +380,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.11.0-gpu-cuda-12
gocv/opencv:4.12.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.12.0-gpu-cuda-12
tags: |
type=sha,format=long
type=raw,value=latest
@@ -404,8 +404,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-gpu-cuda-12
gocv/opencv:4.12.0-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-gpu-cuda-12
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -426,8 +426,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-18.04
gocv/opencv:4.12.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-18.04
tags: |
type=sha,format=long
type=raw,value=latest
@@ -450,8 +450,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-18.04
gocv/opencv:4.12.0-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-18.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -472,8 +472,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-20.04
gocv/opencv:4.12.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-20.04
tags: |
type=sha,format=long
type=raw,value=latest
@@ -496,8 +496,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-20.04
gocv/opencv:4.12.0-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-20.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -518,8 +518,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-22.04
gocv/opencv:4.12.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-22.04
tags: |
type=sha,format=long
type=raw,value=latest
@@ -542,8 +542,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-22.04
gocv/opencv:4.12.0-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-22.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -564,8 +564,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
gocv/opencv:4.11.0-ubuntu-24.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-24.04
gocv/opencv:4.12.0-ubuntu-24.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-24.04
tags: |
type=sha,format=long
type=raw,value=latest
@@ -588,8 +588,8 @@ jobs:
context: .
push: true
tags: |
gocv/opencv:4.11.0-ubuntu-24.04
ghcr.io/${{ github.repository_owner }}/opencv:4.11.0-ubuntu-24.04
gocv/opencv:4.12.0-ubuntu-24.04
ghcr.io/${{ github.repository_owner }}/opencv:4.12.0-ubuntu-24.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View File

@@ -1,17 +1,17 @@
# OpenCV 4 prebuilt multiarchitecture image
#
# To build release:
# docker buildx build -f Dockerfile.opencv -t ghcr.io/hybridgroup/opencv:4.11.0 -t ghcr.io/hybridgroup/opencv:latest --platform=linux/arm64,linux/amd64 --push .
# docker buildx build -f Dockerfile.opencv -t ghcr.io/hybridgroup/opencv:4.12.0 -t ghcr.io/hybridgroup/opencv:latest --platform=linux/arm64,linux/amd64 --push .
#
# To build prerelease:
# docker buildx build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv -t ghcr.io/hybridgroup/opencv:4.11.0-dev --platform=linux/arm64,linux/amd64 --push .
# docker buildx build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv -t ghcr.io/hybridgroup/opencv:4.12.0-dev --platform=linux/arm64,linux/amd64 --push .
###################
# amd64 build stage
###################
FROM --platform=linux/amd64 golang:1.23-bullseye AS opencv-base-amd64
FROM --platform=linux/amd64 golang:1.24-bullseye AS opencv-base-amd64
LABEL maintainer="hybridgroup"
RUN apt-get update && apt-get install -y \
@@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y \
FROM --platform=linux/amd64 opencv-base-amd64 AS opencv-build-amd64
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -63,7 +63,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
-D BUILD_opencv_python2=NO \
-D BUILD_opencv_python3=NO \
-D OPENCV_GENERATE_PKGCONFIG=ON .. && \
make -j $(nproc --all) && \
make -j $(( $(nproc) - 1 )) && \
make preinstall && make install && ldconfig && \
cd / && rm -rf opencv*
@@ -72,7 +72,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
# arm64 build stage
###################
FROM --platform=linux/arm64 golang:1.23-bullseye AS opencv-base-arm64
FROM --platform=linux/arm64 golang:1.24-bullseye AS opencv-base-arm64
LABEL maintainer="hybridgroup"
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -85,7 +85,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
FROM --platform=linux/arm64 opencv-base-arm64 AS opencv-build-arm64
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -129,7 +129,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
-D BUILD_opencv_python3=NO \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D CMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake .. && \
make -j $(nproc --all) && \
make -j $(( $(nproc) - 1 )) && \
make preinstall && make install && ldconfig && \
cd / && rm -rf opencv*

View File

@@ -1,5 +1,5 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-gpu-cuda-10 -t ghcr.io/hybridgroup/opencv:4.11.0-gpu-cuda-10 .
# docker build -f Dockerfile.opencv-gpu-cuda-10 -t ghcr.io/hybridgroup/opencv:4.12.0-gpu-cuda-10 .
FROM nvidia/cuda:10.2-cudnn8-devel AS opencv-gpu-base
LABEL maintainer="hybridgroup"
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
@@ -59,7 +59,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO
# install golang here
FROM opencv-gpu-base AS opencv-gpu-golang
ENV GO_RELEASE=1.23.4
ENV GO_RELEASE=1.24.4
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
rm go${GO_RELEASE}.linux-amd64.tar.gz

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t ghcr.io/hybridgroup/opencv:4.11.0-gpu-cuda-11 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-11.2.2 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-gpu-cuda-11 .
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t ghcr.io/hybridgroup/opencv:4.12.0-gpu-cuda-11 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-11.2.2 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-gpu-cuda-11 .
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base
LABEL maintainer="hybridgroup"
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-22-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -67,7 +67,7 @@ RUN curl -Lo opencv.zip ${OPENCV_FILE} && \
# install golang here
FROM opencv-gpu-cuda-11-base AS opencv-gpu-cuda-11-golang
ENV GO_RELEASE=1.23.4
ENV GO_RELEASE=1.24.4
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
rm go${GO_RELEASE}.linux-amd64.tar.gz

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t ghcr.io/hybridgroup/opencv:4.11.0-gpu-cuda-11.2.2 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-11.2.2 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-gpu-cuda-11.2.2 .
# docker build -f Dockerfile.opencv-gpu-cuda-11 -t ghcr.io/hybridgroup/opencv:4.12.0-gpu-cuda-11.2.2 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-11.2.2 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-gpu-cuda-11.2.2 .
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04 AS opencv-gpu-cuda-11-base
LABEL maintainer="hybridgroup"
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-22-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -67,7 +67,7 @@ RUN curl -Lo opencv.zip ${OPENCV_FILE} && \
# install golang here
FROM opencv-gpu-cuda-11-base AS opencv-gpu-cuda-11-golang
ENV GO_RELEASE=1.23.4
ENV GO_RELEASE=1.24.4
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
rm go${GO_RELEASE}.linux-amd64.tar.gz

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-gpu-cuda-12 -t ghcr.io/hybridgroup/opencv:4.11.0-gpu-cuda-12 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-12 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-gpu-cuda-12 .
# docker build -f Dockerfile.opencv-gpu-cuda-12 -t ghcr.io/hybridgroup/opencv:4.12.0-gpu-cuda-12 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-gpu-cuda-12 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-gpu-cuda-12 .
FROM nvidia/cuda:12.6.1-cudnn-devel-ubuntu22.04 AS opencv-gpu-cuda-12-base
LABEL maintainer="hybridgroup"
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -67,7 +67,7 @@ RUN curl -Lo opencv.zip ${OPENCV_FILE} && \
# install golang here
FROM opencv-gpu-cuda-12-base AS opencv-gpu-cuda-12-golang
ENV GO_RELEASE=1.23.4
ENV GO_RELEASE=1.24.4
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
rm go${GO_RELEASE}.linux-amd64.tar.gz

View File

@@ -1,5 +1,5 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-openvino -t ghcr.io/hybridgroup/opencv:4.11.0-openvino
# docker build -f Dockerfile.opencv-openvino -t ghcr.io/hybridgroup/opencv:4.12.0-openvino
FROM openvino/ubuntu20_dev:2022.1.0 AS opencv-openvino-base
LABEL maintainer="hybridgroup"
ENV DEBIAN_FRONTEND=noninteractive
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
@@ -48,7 +48,7 @@ RUN curl -Lo opencv.zip https://github.com/opencv/opencv/archive/${OPENCV_VERSIO
# install golang here
FROM opencv-openvino-base AS opencv-openvino-golang
ENV GO_RELEASE=1.23.4
ENV GO_RELEASE=1.24.4
RUN wget https://dl.google.com/go/go${GO_RELEASE}.linux-amd64.tar.gz && \
tar xfv go${GO_RELEASE}.linux-amd64.tar.gz -C /usr/local && \
rm go${GO_RELEASE}.linux-amd64.tar.gz

View File

@@ -1,17 +1,17 @@
# OpenCV 4 prebuilt multiarchitecture image
#
# To build release:
# docker buildx build -f Dockerfile.opencv-static -t ghcr.io/hybridgroup/opencv:4.11.0-static --platform=linux/arm64,linux/amd64 --push .
# docker buildx build -f Dockerfile.opencv-static -t ghcr.io/hybridgroup/opencv:4.12.0-static --platform=linux/arm64,linux/amd64 --push .
#
# To build prerelease:
# docker buildx build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-static -t ghcr.io/hybridgroup/opencv:4.11.0-static-dev --platform=linux/arm64,linux/amd64 --push .
# docker buildx build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-static -t ghcr.io/hybridgroup/opencv:4.12.0-static-dev --platform=linux/arm64,linux/amd64 --push .
###################
# amd64 build stage
###################
FROM --platform=linux/amd64 golang:1.22-bullseye AS opencv-base-amd64
FROM --platform=linux/amd64 golang:1.24-bullseye AS opencv-base-amd64
LABEL maintainer="hybridgroup"
RUN apt-get update && apt-get -y install \
autoconf automake libass-dev libgnutls28-dev \
@@ -26,10 +26,10 @@ RUN apt-get update && apt-get -y install \
nasm && \
rm -rf /var/lib/apt/lists/*
RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.0.3.tar.bz2" && \
RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.1.6.tar.bz2" && \
tar -xf ffmpeg-5.0.tar.bz2
RUN cd ffmpeg-5.0.3 && \
RUN cd ffmpeg-5.1.6 && \
./configure --pkg-config-flags="--static" \
--enable-static --disable-shared --enable-gpl --enable-libx264 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m --disable-doc && \
@@ -37,7 +37,7 @@ RUN cd ffmpeg-5.0.3 && \
FROM --platform=linux/amd64 opencv-base-amd64 AS opencv-build-amd64
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -92,7 +92,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
-D BUILD_opencv_python2=NO \
-D BUILD_opencv_python3=NO \
-D OPENCV_GENERATE_PKGCONFIG=ON .. && \
make -j $(nproc --all) && \
make -j $(( $(nproc) - 1 )) && \
make preinstall && make install && ldconfig && \
cd / && rm -rf opencv*
@@ -100,7 +100,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
# arm64 build stage
###################
FROM --platform=linux/arm64 golang:1.22-bullseye AS opencv-base-arm64
FROM --platform=linux/arm64 golang:1.24-bullseye AS opencv-base-arm64
LABEL maintainer="hybridgroup"
RUN apt-get update && apt-get -y install \
autoconf automake libass-dev libgnutls28-dev \
@@ -115,10 +115,10 @@ RUN apt-get update && apt-get -y install \
nasm && \
rm -rf /var/lib/apt/lists/*
RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.0.3.tar.bz2" && \
RUN wget -O ffmpeg-5.0.tar.bz2 "https://www.ffmpeg.org/releases/ffmpeg-5.1.6.tar.bz2" && \
tar -xf ffmpeg-5.0.tar.bz2
RUN cd ffmpeg-5.0.3 && \
RUN cd ffmpeg-5.1.6 && \
./configure --pkg-config-flags="--static" \
--enable-static --disable-shared --enable-gpl --enable-libx264 --enable-libvpx --enable-zlib \
--disable-sdl2 --disable-vaapi --disable-vdpau --disable-v4l2-m2m --disable-doc && \
@@ -126,7 +126,7 @@ RUN cd ffmpeg-5.0.3 && \
FROM --platform=linux/arm64 opencv-base-arm64 AS opencv-build-arm64
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"
@@ -180,7 +180,7 @@ RUN cd opencv-${OPENCV_VERSION} && \
-D BUILD_opencv_python2=NO \
-D BUILD_opencv_python3=NO \
-D OPENCV_GENERATE_PKGCONFIG=ON .. && \
make -j $(nproc --all) && \
make -j $(( $(nproc) - 1 )) && \
make preinstall && make install && ldconfig && \
cd / && rm -rf opencv*

View File

@@ -11,7 +11,7 @@ FROM --platform=linux/amd64 ghcr.io/hybridgroup/gstreamer:1.24-alpine AS gstream
FROM --platform=linux/amd64 ghcr.io/hybridgroup/ffmpeg:5.16-alpine AS builder-amd64
# Set OpenCV version
ARG OPENCV_VERSION=4.11.0
ARG OPENCV_VERSION=4.12.0
# Download OpenCV source code
WORKDIR /opencv
@@ -109,7 +109,7 @@ FROM --platform=linux/arm64 ghcr.io/hybridgroup/gstreamer:1.24-alpine AS gstream
FROM --platform=linux/arm64 ghcr.io/hybridgroup/ffmpeg:5.16-alpine AS builder-arm64
# Set OpenCV version
ARG OPENCV_VERSION=4.11.0
ARG OPENCV_VERSION=4.12.0
# Download OpenCV source code
WORKDIR /opencv

View File

@@ -9,7 +9,7 @@
FROM --platform=linux/amd64 ghcr.io/hybridgroup/ffmpeg:5.16-alpine AS builder-amd64
# Set OpenCV version
ARG OPENCV_VERSION=4.10.0
ARG OPENCV_VERSION=4.12.0
# Download OpenCV source code
WORKDIR /opencv
@@ -93,7 +93,7 @@ RUN cmake -D CMAKE_BUILD_TYPE=Release \
FROM --platform=linux/arm64 ghcr.io/hybridgroup/ffmpeg:5.16-alpine AS builder-arm64
# Set OpenCV version
ARG OPENCV_VERSION=4.10.0
ARG OPENCV_VERSION=4.12.0
# Download OpenCV source code
WORKDIR /opencv

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-ubuntu-18.04 -t ghcr.io/hybridgroup/opencv:4.11.0-ubuntu-18.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-18.04 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-ubuntu-18.04 .
# docker build -f Dockerfile.opencv-ubuntu-18.04 -t ghcr.io/hybridgroup/opencv:4.12.0-ubuntu-18.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-18.04 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-ubuntu-18.04 .
FROM ubuntu:18.04 AS opencv-base
LABEL maintainer="hybridgroup"
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-22-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.11.0-ubuntu-20.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-ubuntu-20.04 .
# docker build -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.12.0-ubuntu-20.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-ubuntu-20.04 .
FROM ubuntu:20.04 AS opencv-base
LABEL maintainer="hybridgroup"
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-22-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-ubuntu-22.04 -t ghcr.io/hybridgroup/opencv:4.11.0-ubuntu-22.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-ubuntu-20.04 .
# docker build -f Dockerfile.opencv-ubuntu-22.04 -t ghcr.io/hybridgroup/opencv:4.12.0-ubuntu-22.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-ubuntu-20.04 .
FROM ubuntu:22.04 AS opencv-base
LABEL maintainer="hybridgroup"
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"

View File

@@ -1,6 +1,6 @@
# to build this docker image:
# docker build -f Dockerfile.opencv-ubuntu-24.04 -t ghcr.io/hybridgroup/opencv:4.11.0-ubuntu-24.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.11.0-dev-ubuntu-20.04 .
# docker build -f Dockerfile.opencv-ubuntu-24.04 -t ghcr.io/hybridgroup/opencv:4.12.0-ubuntu-24.04 .
# docker build --build-arg OPENCV_VERSION="4.x" --build-arg OPENCV_FILE="https://github.com/opencv/opencv/archive/refs/heads/4.x.zip" --build-arg OPENCV_CONTRIB_FILE="https://github.com/opencv/opencv_contrib/archive/refs/heads/4.x.zip" -f Dockerfile.opencv-ubuntu-20.04 -t ghcr.io/hybridgroup/opencv:4.12.0-dev-ubuntu-20.04 .
FROM ubuntu:24.04 AS opencv-base
LABEL maintainer="hybridgroup"
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg-turbo8-dev libpng-dev libtiff-dev libdc1394-dev nasm && \
rm -rf /var/lib/apt/lists/*
ARG OPENCV_VERSION="4.11.0"
ARG OPENCV_VERSION="4.12.0"
ENV OPENCV_VERSION $OPENCV_VERSION
ARG OPENCV_FILE="https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip"

View File

@@ -2,13 +2,13 @@
.PHONY: test deps download build clean astyle cmds docker
# GoCV version to use.
GOCV_VERSION?="v0.41.0"
GOCV_VERSION?="v0.42.0"
# OpenCV version to use.
OPENCV_VERSION?=4.11.0
OPENCV_VERSION?=4.12.0
# Go version to use when building Docker image
GOVERSION?=1.23.4
GOVERSION?=1.24.4
# Temporary directory to put files into.
TMP_DIR?=/tmp/