From b3cd0c2f33102aa75e87116fce7edb801089e322 Mon Sep 17 00:00:00 2001 From: aanokhov Date: Wed, 7 Jan 2026 17:31:58 +0100 Subject: [PATCH 1/3] Removed opencv from actual Docker images. --- .github/workflows/manual_publish.yml | 2 +- .github/workflows/update_dockerfiles.yml | 2 +- templates/rhel8/common/base.dockerfile.j2 | 148 +-------------- templates/rhel8/dist/dev.dockerfile.j2 | 3 - templates/rhel8/env/dev_env.dockerfile.j2 | 6 +- templates/rhel8/env/runtime_env.dockerfile.j2 | 6 +- templates/rhel8/install/copy.dockerfile.j2 | 5 +- templates/ubuntu22/common/base.dockerfile.j2 | 165 +---------------- templates/ubuntu22/env/dev_env.dockerfile.j2 | 7 +- .../env/dev_no_samples_env.dockerfile.j2 | 6 +- .../ubuntu22/env/runtime_env.dockerfile.j2 | 5 +- templates/ubuntu22/install/copy.dockerfile.j2 | 1 - templates/ubuntu24/common/base.dockerfile.j2 | 172 +----------------- templates/ubuntu24/dist/dev.dockerfile.j2 | 4 - templates/ubuntu24/env/dev_env.dockerfile.j2 | 5 +- .../env/dev_no_samples_env.dockerfile.j2 | 6 +- .../ubuntu24/env/runtime_env.dockerfile.j2 | 5 +- templates/ubuntu24/install/copy.dockerfile.j2 | 1 - 18 files changed, 40 insertions(+), 509 deletions(-) diff --git a/.github/workflows/manual_publish.yml b/.github/workflows/manual_publish.yml index f1c2aa98..340fa827 100644 --- a/.github/workflows/manual_publish.yml +++ b/.github/workflows/manual_publish.yml @@ -34,7 +34,7 @@ jobs: manual_publish: strategy: matrix: - os: [ ubuntu-20.04, windows-docker ] + os: [ ubuntu-24.04, windows-docker ] runs-on: ${{ matrix.os }} steps: - name: Code checkout diff --git a/.github/workflows/update_dockerfiles.yml b/.github/workflows/update_dockerfiles.yml index bf21ec6f..584ada31 100644 --- a/.github/workflows/update_dockerfiles.yml +++ b/.github/workflows/update_dockerfiles.yml @@ -12,7 +12,7 @@ permissions: read-all jobs: update_dockerfiles: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Code checkout uses: actions/checkout@v2 diff --git a/templates/rhel8/common/base.dockerfile.j2 b/templates/rhel8/common/base.dockerfile.j2 index 2ab85f5e..cb3fe2ce 100644 --- a/templates/rhel8/common/base.dockerfile.j2 +++ b/templates/rhel8/common/base.dockerfile.j2 @@ -19,144 +19,13 @@ WORKDIR / SHELL ["/bin/bash", "-xo", "pipefail", "-c"] +ENV INTEL_OPENVINO_DIR /opt/intel/openvino + {% for pre_command in pre_commands %} {{ pre_command|safe }} {% endfor %} -RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir ${INTEL_OPENVINO_DIR}/.distribution && \ +RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR}/.distribution && \ touch ${INTEL_OPENVINO_DIR}/.distribution/docker -# ----------------- - -{% if distribution == 'dev' %} - -FROM base as opencv -LABEL description="This is the dev image for OpenCV building with OpenVINO Runtime backend" -LABEL vendor="Intel Corporation" - -RUN rm -f /etc/rhsm-host -{% if 'autobuild' != rhel_platform %} -COPY ./entitlement /etc/pki/entitlement -COPY ./rhsm-conf /etc/rhsm -{% endif %} -RUN subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms - -# hadolint ignore=DL3041 -RUN curl --insecure -LO https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \ - && curl --insecure -LO https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm \ - && dnf install -y epel-release-latest-8.noarch.rpm rpmfusion-free-release-8.noarch.rpm \ - && dnf install -y \ - gtk3-devel \ - gstreamer1-devel \ - gstreamer1-plugins-base-devel \ - ffmpeg-devel \ - libmfx-devel \ - cmake \ - git \ - python3.12-devel \ - python3.12-numpy \ - python3-pip \ - python3-virtualenv \ - gcc-c++ \ - gcc \ - && dnf clean all - -RUN rm -rf /etc/pki/entitlement && rm -rf /etc/rhsm - -ARG OPENCV_BRANCH=4.10.0 -WORKDIR /opt/repo -RUN git clone https://github.com/opencv/opencv.git -WORKDIR /opt/repo/opencv -RUN git checkout ${OPENCV_BRANCH} -WORKDIR /opt/repo/opencv/build - -# hadolint ignore=SC2046 -RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \ - cmake \ - -D BUILD_INFO_SKIP_EXTRA_MODULES=ON \ - -D BUILD_EXAMPLES=OFF \ - -D BUILD_JASPER=OFF \ - -D BUILD_JAVA=OFF \ - -D BUILD_JPEG=ON \ - -D BUILD_APPS_LIST=version \ - -D BUILD_opencv_apps=ON \ - -D BUILD_opencv_java=OFF \ - -D BUILD_OPENEXR=OFF \ - -D BUILD_PNG=ON \ - -D BUILD_TBB=OFF \ - -D BUILD_WEBP=OFF \ - -D BUILD_ZLIB=ON \ - -D BUILD_TESTS=ON \ - -D WITH_1394=OFF \ - -D WITH_CUDA=OFF \ - -D WITH_EIGEN=OFF \ - -D WITH_GPHOTO2=OFF \ - -D WITH_GSTREAMER=ON \ - -D OPENCV_GAPI_GSTREAMER=OFF \ - -D WITH_GTK_2_X=OFF \ - -D WITH_IPP=ON \ - -D WITH_JASPER=OFF \ - -D WITH_LAPACK=OFF \ - -D WITH_MATLAB=OFF \ - -D WITH_MFX=OFF \ - -D WITH_OPENCLAMDBLAS=OFF \ - -D WITH_OPENCLAMDFFT=OFF \ - -D WITH_OPENEXR=OFF \ - -D WITH_OPENJPEG=OFF \ - -D WITH_QUIRC=OFF \ - -D WITH_TBB=OFF \ - -D WITH_TIFF=OFF \ - -D WITH_VTK=OFF \ - -D WITH_WEBP=OFF \ - -D CMAKE_USE_RELATIVE_PATHS=ON \ - -D CMAKE_SKIP_INSTALL_RPATH=ON \ - -D ENABLE_BUILD_HARDENING=ON \ - -D ENABLE_CONFIG_VERIFICATION=ON \ - -D ENABLE_PRECOMPILED_HEADERS=OFF \ - -D ENABLE_CXX11=ON \ - -D INSTALL_PDB=ON \ - -D INSTALL_TESTS=ON \ - -D INSTALL_C_EXAMPLES=OFF \ - -D INSTALL_PYTHON_EXAMPLES=OFF \ - -D CMAKE_INSTALL_PREFIX=install \ - -D OPENCV_SKIP_PKGCONFIG_GENERATION=ON \ - -D OPENCV_SKIP_PYTHON_LOADER=OFF \ - -D OPENCV_SKIP_CMAKE_ROOT_CONFIG=ON \ - -D OPENCV_GENERATE_SETUPVARS=OFF \ - -D OPENCV_BIN_INSTALL_PATH=bin \ - -D OPENCV_INCLUDE_INSTALL_PATH=include \ - -D OPENCV_LIB_INSTALL_PATH=lib \ - -D OPENCV_CONFIG_INSTALL_PATH=cmake \ - -D OPENCV_3P_LIB_INSTALL_PATH=3rdparty \ - -D OPENCV_SAMPLES_SRC_INSTALL_PATH=samples \ - -D OPENCV_DOC_INSTALL_PATH=doc \ - -D OPENCV_OTHER_INSTALL_PATH=etc \ - -D OPENCV_LICENSES_INSTALL_PATH=etc/licenses \ - -D OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT=ON \ - -D BUILD_opencv_world=OFF \ - -D BUILD_opencv_python2=OFF \ - -D BUILD_opencv_python3=ON \ - -D BUILD_opencv_dnn=OFF \ - -D BUILD_opencv_gapi=OFF \ - -D PYTHON3_PACKAGES_PATH=install/python/python3 \ - -D PYTHON3_LIMITED_API=ON \ - -D HIGHGUI_PLUGIN_LIST=all \ - -D OPENCV_PYTHON_INSTALL_PATH=python \ - -D CPU_BASELINE=SSE4_2 \ - -D OPENCV_IPP_GAUSSIAN_BLUR=ON \ - -D WITH_INF_ENGINE=ON \ - -D InferenceEngine_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D ngraph_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D INF_ENGINE_RELEASE=2022010000 \ - -D VIDEOIO_PLUGIN_LIST=ffmpeg,gstreamer \ - -D CMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \ - -D CMAKE_BUILD_TYPE=Release /opt/repo/opencv && \ - make -j$(nproc) && cmake -P cmake_install.cmake && \ - rm -Rf install/bin install/etc/samples - -WORKDIR /opt/repo/opencv/build/install -CMD ["/bin/bash"] -# ------------------------------------------------------------------------------------------------- - -{% endif %} {% if 'docker' == rhel_platform %} # ----------------- @@ -177,18 +46,11 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"] {% endif %} -# Creating user openvino and adding it to groups "video" and "users" to use GPU and VPU +# adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && useradd -ms /bin/bash -G video,users openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ chown openvino -R /home/openvino -{% if 'docker' == rhel_platform %} - -ENV INTEL_OPENVINO_DIR /opt/intel/openvino - -COPY --from=base /opt/intel /opt/intel -{% endif %} - {% if 'runtime' == distribution %} ARG LGPL_DEPS="bash python3.12" # no new packages ARG INSTALL_PACKAGES="-c=python -c=core" diff --git a/templates/rhel8/dist/dev.dockerfile.j2 b/templates/rhel8/dist/dev.dockerfile.j2 index 590f7a9f..b3e8924e 100644 --- a/templates/rhel8/dist/dev.dockerfile.j2 +++ b/templates/rhel8/dist/dev.dockerfile.j2 @@ -23,9 +23,6 @@ WORKDIR ${INTEL_OPENVINO_DIR}/licensing RUN curl -L https://raw.githubusercontent.com/openvinotoolkit/docker_ci/master/dockerfiles/rhel8/third-party-programs-docker-runtime.txt --output third-party-programs-docker-runtime.txt && \ curl -L https://raw.githubusercontent.com/openvinotoolkit/docker_ci/master/dockerfiles/rhel8/third-party-programs-docker-dev.txt --output third-party-programs-docker-dev.txt -COPY --from=opencv /opt/repo/opencv/build/install ${INTEL_OPENVINO_DIR}/extras/opencv -RUN echo "export OpenCV_DIR=${INTEL_OPENVINO_DIR}/extras/opencv/cmake" | tee -a "${INTEL_OPENVINO_DIR}/extras/opencv/setupvars.sh"; \ - echo "export LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/extras/opencv/lib:\$LD_LIBRARY_PATH" | tee -a "${INTEL_OPENVINO_DIR}/extras/opencv/setupvars.sh" # Install dependencies needed by OV::RemoteTensor RUN yum install -y \ diff --git a/templates/rhel8/env/dev_env.dockerfile.j2 b/templates/rhel8/env/dev_env.dockerfile.j2 index dcf972ec..46b81d31 100644 --- a/templates/rhel8/env/dev_env.dockerfile.j2 +++ b/templates/rhel8/env/dev_env.dockerfile.j2 @@ -1,9 +1,7 @@ -ENV HDDL_INSTALL_DIR=/opt/intel/openvino/runtime/3rdparty/hddl ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/extras/opencv/lib -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake diff --git a/templates/rhel8/env/runtime_env.dockerfile.j2 b/templates/rhel8/env/runtime_env.dockerfile.j2 index 9eb25ba5..46b81d31 100644 --- a/templates/rhel8/env/runtime_env.dockerfile.j2 +++ b/templates/rhel8/env/runtime_env.dockerfile.j2 @@ -1,9 +1,7 @@ -ENV HDDL_INSTALL_DIR=/opt/intel/openvino/runtime/3rdparty/hddl ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake diff --git a/templates/rhel8/install/copy.dockerfile.j2 b/templates/rhel8/install/copy.dockerfile.j2 index 5a2d9b87..cd176e86 100644 --- a/templates/rhel8/install/copy.dockerfile.j2 +++ b/templates/rhel8/install/copy.dockerfile.j2 @@ -1,13 +1,12 @@ # install product by copying archive content -# Creating user openvino and adding it to groups"users" -RUN useradd -ms /bin/bash -G users openvino - {% if 'autobuild' != rhel_platform %} ARG TEMP_DIR=/tmp/openvino_installer {% endif -%} ENV INTEL_OPENVINO_DIR /opt/intel/openvino +RUN useradd -ms /bin/bash -G users openvino + {% if 'openshift' == rhel_platform %} WORKDIR ${TEMP_DIR} {% endif %} diff --git a/templates/ubuntu22/common/base.dockerfile.j2 b/templates/ubuntu22/common/base.dockerfile.j2 index c14adb5b..8c6877e4 100644 --- a/templates/ubuntu22/common/base.dockerfile.j2 +++ b/templates/ubuntu22/common/base.dockerfile.j2 @@ -2,6 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 FROM ubuntu:22.04 AS base +LABEL description="This is the {{ distribution }} image for {{ product_name }} on Ubuntu 22.04 LTS" +LABEL vendor="Intel Corporation" + # hadolint ignore=DL3002 USER root WORKDIR / @@ -9,6 +12,7 @@ WORKDIR / SHELL ["/bin/bash", "-xo", "pipefail", "-c"] ENV DEBIAN_FRONTEND=noninteractive +ENV INTEL_OPENVINO_DIR /opt/intel/openvino # hadolint ignore=DL3008 RUN apt-get update && \ @@ -18,169 +22,14 @@ RUN apt-get update && \ {% for pre_command in pre_commands %} {{ pre_command|safe }} {% endfor %} -RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir ${INTEL_OPENVINO_DIR}/.distribution && \ +RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR}/.distribution && \ touch ${INTEL_OPENVINO_DIR}/.distribution/docker -# ----------------- - -{% if distribution == 'dev' %} - -FROM base AS opencv - -LABEL description="This is the dev image for OpenCV building with OpenVINO Runtime backend" -LABEL vendor="Intel Corporation" - -SHELL ["/bin/bash", "-xo", "pipefail", "-c"] - -# hadolint ignore=DL3008 -RUN apt-get update; \ - apt-get install -y --no-install-recommends \ - git \ - python3-dev \ - python3-pip \ - build-essential \ - cmake \ - ninja-build \ - libgtk-3-dev \ - libpng-dev \ - libjpeg-dev \ - libwebp-dev \ - libtiff5-dev \ - libopenexr-dev \ - libopenblas-dev \ - libx11-dev \ - libavutil-dev \ - libavcodec-dev \ - libavformat-dev \ - libswscale-dev \ - libswresample-dev \ - libtbb2 \ - libssl-dev \ - libva-dev \ - libmfx-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev && \ - rm -rf /var/lib/apt/lists/* - -RUN python3 -m pip install --no-cache-dir numpy==1.23.1 - -ARG OPENCV_BRANCH="377be68d923e40900ac5526242bcf221e3f355e5" # 4.8 with a fix for building tests -WORKDIR /opt/repo -RUN git clone https://github.com/opencv/opencv.git -WORKDIR /opt/repo/opencv -RUN git checkout ${OPENCV_BRANCH} -WORKDIR /opt/repo/opencv/build - -# hadolint ignore=SC1091 -RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \ - cmake -G Ninja \ - -D BUILD_INFO_SKIP_EXTRA_MODULES=ON \ - -D BUILD_EXAMPLES=OFF \ - -D BUILD_JASPER=OFF \ - -D BUILD_JAVA=OFF \ - -D BUILD_JPEG=ON \ - -D BUILD_APPS_LIST=version \ - -D BUILD_opencv_apps=ON \ - -D BUILD_opencv_java=OFF \ - -D BUILD_OPENEXR=OFF \ - -D BUILD_PNG=ON \ - -D BUILD_TBB=OFF \ - -D BUILD_WEBP=OFF \ - -D BUILD_ZLIB=ON \ - -D BUILD_TESTS=ON \ - -D WITH_1394=OFF \ - -D WITH_CUDA=OFF \ - -D WITH_EIGEN=OFF \ - -D WITH_GPHOTO2=OFF \ - -D WITH_GSTREAMER=ON \ - -D OPENCV_GAPI_GSTREAMER=OFF \ - -D WITH_GTK_2_X=OFF \ - -D WITH_IPP=ON \ - -D WITH_JASPER=OFF \ - -D WITH_LAPACK=OFF \ - -D WITH_MATLAB=OFF \ - -D WITH_MFX=ON \ - -D WITH_OPENCLAMDBLAS=OFF \ - -D WITH_OPENCLAMDFFT=OFF \ - -D WITH_OPENEXR=OFF \ - -D WITH_OPENJPEG=OFF \ - -D WITH_QUIRC=OFF \ - -D WITH_TBB=OFF \ - -D WITH_TIFF=OFF \ - -D WITH_VTK=OFF \ - -D WITH_WEBP=OFF \ - -D CMAKE_USE_RELATIVE_PATHS=ON \ - -D CMAKE_SKIP_INSTALL_RPATH=ON \ - -D ENABLE_BUILD_HARDENING=ON \ - -D ENABLE_CONFIG_VERIFICATION=ON \ - -D ENABLE_PRECOMPILED_HEADERS=OFF \ - -D ENABLE_CXX11=ON \ - -D INSTALL_PDB=ON \ - -D INSTALL_TESTS=ON \ - -D INSTALL_C_EXAMPLES=OFF \ - -D INSTALL_PYTHON_EXAMPLES=OFF \ - -D CMAKE_INSTALL_PREFIX=install \ - -D OPENCV_SKIP_PKGCONFIG_GENERATION=ON \ - -D OPENCV_SKIP_PYTHON_LOADER=OFF \ - -D OPENCV_SKIP_CMAKE_ROOT_CONFIG=ON \ - -D OPENCV_GENERATE_SETUPVARS=OFF \ - -D OPENCV_BIN_INSTALL_PATH=bin \ - -D OPENCV_INCLUDE_INSTALL_PATH=include \ - -D OPENCV_LIB_INSTALL_PATH=lib \ - -D OPENCV_CONFIG_INSTALL_PATH=cmake \ - -D OPENCV_3P_LIB_INSTALL_PATH=3rdparty \ - -D OPENCV_DOC_INSTALL_PATH=doc \ - -D OPENCV_OTHER_INSTALL_PATH=etc \ - -D OPENCV_LICENSES_INSTALL_PATH=etc/licenses \ - -D OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT=ON \ - -D BUILD_opencv_world=OFF \ - -D BUILD_opencv_python2=OFF \ - -D BUILD_opencv_python3=ON \ - -D BUILD_opencv_dnn=OFF \ - -D BUILD_opencv_gapi=OFF \ - -D PYTHON3_PACKAGES_PATH=install/python/python3 \ - -D PYTHON3_LIMITED_API=ON \ - -D HIGHGUI_PLUGIN_LIST=all \ - -D OPENCV_PYTHON_INSTALL_PATH=python \ - -D CPU_BASELINE=SSE4_2 \ - -D OPENCV_IPP_GAUSSIAN_BLUR=ON \ - -D WITH_INF_ENGINE=ON \ - -D InferenceEngine_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D ngraph_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D INF_ENGINE_RELEASE=2022010000 \ - -D VIDEOIO_PLUGIN_LIST=ffmpeg,gstreamer,mfx \ - -D CMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \ - -D CMAKE_BUILD_TYPE=Release /opt/repo/opencv && \ - ninja -j "$(nproc)" && cmake --install . && \ - rm -Rf install/bin install/etc/samples - -WORKDIR /opt/repo/opencv/build/install -CMD ["/bin/bash"] -# ------------------------------------------------------------------------------------------------- -{% endif %} - -FROM ubuntu:22.04 AS ov_base - -LABEL description="This is the {{ distribution }} image for {{ product_name }} on Ubuntu 22.04 LTS" -LABEL vendor="Intel Corporation" - -USER root -WORKDIR / -SHELL ["/bin/bash", "-xo", "pipefail", "-c"] - -ENV DEBIAN_FRONTEND=noninteractive - -# Creating user openvino and adding it to groups "video" and "users" to use GPU and VPU +# adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && useradd -ms /bin/bash -G video,users openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ chown openvino -R /home/openvino -RUN mkdir /opt/intel - -ENV INTEL_OPENVINO_DIR /opt/intel/openvino - -COPY --from=base /opt/intel/ /opt/intel/ - WORKDIR /thirdparty ARG INSTALL_SOURCES="no" diff --git a/templates/ubuntu22/env/dev_env.dockerfile.j2 b/templates/ubuntu22/env/dev_env.dockerfile.j2 index 3c29bc5a..36e3ef46 100644 --- a/templates/ubuntu22/env/dev_env.dockerfile.j2 +++ b/templates/ubuntu22/env/dev_env.dockerfile.j2 @@ -1,11 +1,10 @@ ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/extras/opencv/lib -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake ENV INTEL_OPENVINO_DIR=/opt/intel/openvino ENV OV_TOKENIZER_PREBUILD_EXTENSION_PATH=/opt/intel/openvino/runtime/lib/intel64/libopenvino_tokenizers.so -ENV PKG_CONFIG_PATH=/opt/intel/openvino/runtime/lib/intel64/pkgconfig +ENV PKG_CONFIG_PATH=/opt/intel/openvino/runtime/lib/intel64/pkgconfig \ No newline at end of file diff --git a/templates/ubuntu22/env/dev_no_samples_env.dockerfile.j2 b/templates/ubuntu22/env/dev_no_samples_env.dockerfile.j2 index 63696ad7..decdeb3f 100644 --- a/templates/ubuntu22/env/dev_no_samples_env.dockerfile.j2 +++ b/templates/ubuntu22/env/dev_no_samples_env.dockerfile.j2 @@ -1,9 +1,7 @@ -ENV HDDL_INSTALL_DIR=/opt/intel/openvino/runtime/3rdparty/hddl ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/extras/opencv/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/3rdparty/hddl/lib -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/runtime/3rdparty/tbb/lib ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python/python3.8:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python/python3.8:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake \ No newline at end of file diff --git a/templates/ubuntu22/env/runtime_env.dockerfile.j2 b/templates/ubuntu22/env/runtime_env.dockerfile.j2 index 8f6f8a28..50b46f46 100644 --- a/templates/ubuntu22/env/runtime_env.dockerfile.j2 +++ b/templates/ubuntu22/env/runtime_env.dockerfile.j2 @@ -1,8 +1,7 @@ ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake diff --git a/templates/ubuntu22/install/copy.dockerfile.j2 b/templates/ubuntu22/install/copy.dockerfile.j2 index 377e21c6..b65258c2 100644 --- a/templates/ubuntu22/install/copy.dockerfile.j2 +++ b/templates/ubuntu22/install/copy.dockerfile.j2 @@ -2,7 +2,6 @@ ARG TEMP_DIR=/tmp/openvino_installer ENV INTEL_OPENVINO_DIR=/opt/intel/openvino -# Creating user openvino and adding it to groups"users" RUN useradd -ms /bin/bash -G users openvino RUN find "${TEMP_DIR}" \( -name "*.tgz" -o -name "*.tar.gz" \) -exec tar -xzf {} \; && \ diff --git a/templates/ubuntu24/common/base.dockerfile.j2 b/templates/ubuntu24/common/base.dockerfile.j2 index 4ede0b2b..d73f734b 100644 --- a/templates/ubuntu24/common/base.dockerfile.j2 +++ b/templates/ubuntu24/common/base.dockerfile.j2 @@ -2,6 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 FROM ubuntu:24.04 AS base +LABEL description="This is the {{ distribution }} image for {{ product_name }} on Ubuntu 24.04 LTS" +LABEL vendor="Intel Corporation" + # hadolint ignore=DL3002 USER root WORKDIR / @@ -9,6 +12,7 @@ WORKDIR / SHELL ["/bin/bash", "-xo", "pipefail", "-c"] ENV DEBIAN_FRONTEND=noninteractive +ENV INTEL_OPENVINO_DIR /opt/intel/openvino # hadolint ignore=DL3008 RUN apt-get update && \ @@ -18,176 +22,14 @@ RUN apt-get update && \ {% for pre_command in pre_commands %} {{ pre_command|safe }} {% endfor %} -RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir ${INTEL_OPENVINO_DIR}/.distribution && \ +RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR}/.distribution && \ touch ${INTEL_OPENVINO_DIR}/.distribution/docker -# ----------------- - -{% if distribution == 'dev' %} - -FROM base AS opencv - -LABEL description="This is the dev image for OpenCV building with OpenVINO Runtime backend" -LABEL vendor="Intel Corporation" - -SHELL ["/bin/bash", "-xo", "pipefail", "-c"] -# hadolint ignore=DL3008 -RUN apt-get update; \ - apt-get install -y --no-install-recommends \ - git \ - python3-dev \ - python3-pip \ - python3-venv \ - build-essential \ - cmake \ - ninja-build \ - libgtk-3-dev \ - libpng-dev \ - libjpeg-dev \ - libwebp-dev \ - libtiff5-dev \ - libopenexr-dev \ - libopenblas-dev \ - libx11-dev \ - libavutil-dev \ - libavcodec-dev \ - libavformat-dev \ - libswscale-dev \ - libswresample-dev \ - # libtbb2 \ - libssl-dev \ - libva-dev \ - libmfx-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev && \ - rm -rf /var/lib/apt/lists/* - -ENV VIRTUAL_ENV=/opt/venv -RUN python3 -m venv $VIRTUAL_ENV -ENV PATH=$VIRTUAL_ENV/bin:$PATH - -# hadolint ignore=DL3013 -RUN python3 -m pip install --no-cache-dir --upgrade pip -RUN python3 -m pip install --no-cache-dir numpy==1.26.4 - -ARG OPENCV_BRANCH=4.10.0 -WORKDIR /opt/repo -RUN git clone https://github.com/opencv/opencv.git -WORKDIR /opt/repo/opencv -RUN git checkout ${OPENCV_BRANCH} -WORKDIR /opt/repo/opencv/build - -# hadolint ignore=SC1091 -RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \ - cmake -G Ninja \ - -D BUILD_INFO_SKIP_EXTRA_MODULES=ON \ - -D BUILD_EXAMPLES=OFF \ - -D BUILD_JASPER=OFF \ - -D BUILD_JAVA=OFF \ - -D BUILD_JPEG=ON \ - -D BUILD_APPS_LIST=version \ - -D BUILD_opencv_apps=ON \ - -D BUILD_opencv_java=OFF \ - -D BUILD_OPENEXR=OFF \ - -D BUILD_PNG=ON \ - -D BUILD_TBB=OFF \ - -D BUILD_WEBP=OFF \ - -D BUILD_ZLIB=ON \ - -D BUILD_TESTS=ON \ - -D WITH_1394=OFF \ - -D WITH_CUDA=OFF \ - -D WITH_EIGEN=OFF \ - -D WITH_GPHOTO2=OFF \ - -D WITH_GSTREAMER=ON \ - -D OPENCV_GAPI_GSTREAMER=OFF \ - -D WITH_GTK_2_X=OFF \ - -D WITH_IPP=ON \ - -D WITH_JASPER=OFF \ - -D WITH_LAPACK=OFF \ - -D WITH_MATLAB=OFF \ - -D WITH_MFX=ON \ - -D WITH_OPENCLAMDBLAS=OFF \ - -D WITH_OPENCLAMDFFT=OFF \ - -D WITH_OPENEXR=OFF \ - -D WITH_OPENJPEG=OFF \ - -D WITH_QUIRC=OFF \ - -D WITH_TBB=OFF \ - -D WITH_TIFF=OFF \ - -D WITH_VTK=OFF \ - -D WITH_WEBP=OFF \ - -D CMAKE_USE_RELATIVE_PATHS=ON \ - -D CMAKE_SKIP_INSTALL_RPATH=ON \ - -D ENABLE_BUILD_HARDENING=ON \ - -D ENABLE_CONFIG_VERIFICATION=ON \ - -D ENABLE_PRECOMPILED_HEADERS=OFF \ - -D ENABLE_CXX11=ON \ - -D INSTALL_PDB=ON \ - -D INSTALL_TESTS=ON \ - -D INSTALL_C_EXAMPLES=OFF \ - -D INSTALL_PYTHON_EXAMPLES=OFF \ - -D CMAKE_INSTALL_PREFIX=install \ - -D OPENCV_SKIP_PKGCONFIG_GENERATION=ON \ - -D OPENCV_SKIP_PYTHON_LOADER=OFF \ - -D OPENCV_SKIP_CMAKE_ROOT_CONFIG=ON \ - -D OPENCV_GENERATE_SETUPVARS=OFF \ - -D OPENCV_BIN_INSTALL_PATH=bin \ - -D OPENCV_INCLUDE_INSTALL_PATH=include \ - -D OPENCV_LIB_INSTALL_PATH=lib \ - -D OPENCV_CONFIG_INSTALL_PATH=cmake \ - -D OPENCV_3P_LIB_INSTALL_PATH=3rdparty \ - -D OPENCV_DOC_INSTALL_PATH=doc \ - -D OPENCV_OTHER_INSTALL_PATH=etc \ - -D OPENCV_LICENSES_INSTALL_PATH=etc/licenses \ - -D OPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT=ON \ - -D BUILD_opencv_world=OFF \ - -D BUILD_opencv_python2=OFF \ - -D BUILD_opencv_python3=ON \ - -D BUILD_opencv_dnn=OFF \ - -D BUILD_opencv_gapi=OFF \ - -D PYTHON3_PACKAGES_PATH=install/python/python3 \ - -D PYTHON3_LIMITED_API=ON \ - -D HIGHGUI_PLUGIN_LIST=all \ - -D OPENCV_PYTHON_INSTALL_PATH=python \ - -D CPU_BASELINE=SSE4_2 \ - -D OPENCV_IPP_GAUSSIAN_BLUR=ON \ - -D WITH_INF_ENGINE=ON \ - -D InferenceEngine_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D ngraph_DIR="${INTEL_OPENVINO_DIR}"/runtime/cmake/ \ - -D INF_ENGINE_RELEASE=2022010000 \ - -D VIDEOIO_PLUGIN_LIST=ffmpeg,gstreamer,mfx \ - -D CMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \ - -D CMAKE_BUILD_TYPE=Release /opt/repo/opencv && \ - ninja -j "$(nproc)" && cmake --install . && \ - rm -Rf install/bin install/etc/samples - -WORKDIR /opt/repo/opencv/build/install -CMD ["/bin/bash"] -# ------------------------------------------------------------------------------------------------- -{% endif %} - -FROM ubuntu:24.04 AS ov_base - -LABEL description="This is the {{ distribution }} image for {{ product_name }} on Ubuntu 22.04 LTS" -LABEL vendor="Intel Corporation" - -USER root -WORKDIR / - -SHELL ["/bin/bash", "-xo", "pipefail", "-c"] - -ENV DEBIAN_FRONTEND=noninteractive - -# Creating user openvino and adding it to groups "video" and "users" to use GPU and VPU +# adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && useradd -ms /bin/bash -G video,users openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ chown openvino -R /home/openvino -RUN mkdir /opt/intel - -ENV INTEL_OPENVINO_DIR /opt/intel/openvino - -COPY --from=base /opt/intel/ /opt/intel/ - WORKDIR /thirdparty ARG INSTALL_SOURCES="no" diff --git a/templates/ubuntu24/dist/dev.dockerfile.j2 b/templates/ubuntu24/dist/dev.dockerfile.j2 index e6255d2a..62ed2264 100644 --- a/templates/ubuntu24/dist/dev.dockerfile.j2 +++ b/templates/ubuntu24/dist/dev.dockerfile.j2 @@ -19,10 +19,6 @@ WORKDIR ${INTEL_OPENVINO_DIR}/licensing COPY dockerfiles/{{os}}/third-party-programs-docker-dev.txt ${INTEL_OPENVINO_DIR}/licensing COPY dockerfiles/{{os}}/third-party-programs-docker-runtime.txt ${INTEL_OPENVINO_DIR}/licensing -COPY --from=opencv /opt/repo/opencv/build/install ${INTEL_OPENVINO_DIR}/extras/opencv -RUN echo "export OpenCV_DIR=${INTEL_OPENVINO_DIR}/extras/opencv/cmake" | tee -a "${INTEL_OPENVINO_DIR}/extras/opencv/setupvars.sh"; \ - echo "export LD_LIBRARY_PATH=${INTEL_OPENVINO_DIR}/extras/opencv/lib:\$LD_LIBRARY_PATH" | tee -a "${INTEL_OPENVINO_DIR}/extras/opencv/setupvars.sh" - # Install dependencies for OV::RemoteTensor RUN apt-get update && apt-get install -y --no-install-recommends opencl-headers ocl-icd-opencl-dev && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* diff --git a/templates/ubuntu24/env/dev_env.dockerfile.j2 b/templates/ubuntu24/env/dev_env.dockerfile.j2 index 3c29bc5a..50b46f46 100644 --- a/templates/ubuntu24/env/dev_env.dockerfile.j2 +++ b/templates/ubuntu24/env/dev_env.dockerfile.j2 @@ -1,8 +1,7 @@ ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/extras/opencv/lib -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake diff --git a/templates/ubuntu24/env/dev_no_samples_env.dockerfile.j2 b/templates/ubuntu24/env/dev_no_samples_env.dockerfile.j2 index 63696ad7..decdeb3f 100644 --- a/templates/ubuntu24/env/dev_no_samples_env.dockerfile.j2 +++ b/templates/ubuntu24/env/dev_no_samples_env.dockerfile.j2 @@ -1,9 +1,7 @@ -ENV HDDL_INSTALL_DIR=/opt/intel/openvino/runtime/3rdparty/hddl ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/extras/opencv/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/3rdparty/hddl/lib -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool:/opt/intel/openvino/runtime/3rdparty/tbb/lib ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python/python3.8:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python/python3.8:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake \ No newline at end of file diff --git a/templates/ubuntu24/env/runtime_env.dockerfile.j2 b/templates/ubuntu24/env/runtime_env.dockerfile.j2 index 8f6f8a28..50b46f46 100644 --- a/templates/ubuntu24/env/runtime_env.dockerfile.j2 +++ b/templates/ubuntu24/env/runtime_env.dockerfile.j2 @@ -1,8 +1,7 @@ ENV InferenceEngine_DIR=/opt/intel/openvino/runtime/cmake -ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/hddl/lib:/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool -ENV OpenCV_DIR=/opt/intel/openvino/extras/opencv/cmake +ENV LD_LIBRARY_PATH=/opt/intel/openvino/runtime/3rdparty/tbb/lib:/opt/intel/openvino/runtime/lib/intel64:/opt/intel/openvino/tools/compile_tool ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python +ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3 ENV TBB_DIR=/opt/intel/openvino/runtime/3rdparty/tbb/cmake ENV ngraph_DIR=/opt/intel/openvino/runtime/cmake ENV OpenVINO_DIR=/opt/intel/openvino/runtime/cmake diff --git a/templates/ubuntu24/install/copy.dockerfile.j2 b/templates/ubuntu24/install/copy.dockerfile.j2 index 377e21c6..b65258c2 100644 --- a/templates/ubuntu24/install/copy.dockerfile.j2 +++ b/templates/ubuntu24/install/copy.dockerfile.j2 @@ -2,7 +2,6 @@ ARG TEMP_DIR=/tmp/openvino_installer ENV INTEL_OPENVINO_DIR=/opt/intel/openvino -# Creating user openvino and adding it to groups"users" RUN useradd -ms /bin/bash -G users openvino RUN find "${TEMP_DIR}" \( -name "*.tgz" -o -name "*.tar.gz" \) -exec tar -xzf {} \; && \ From 8ef1d3686a3f9dc4e31948c25ee516590bccfa35 Mon Sep 17 00:00:00 2001 From: aanokhov Date: Thu, 8 Jan 2026 13:54:04 +0100 Subject: [PATCH 2/3] Updated adding 'render' group for ov-base images. Removed useless if-case for rhel8 --- templates/rhel8/common/base.dockerfile.j2 | 5 +---- templates/ubuntu22/common/base.dockerfile.j2 | 2 +- templates/ubuntu24/common/base.dockerfile.j2 | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/templates/rhel8/common/base.dockerfile.j2 b/templates/rhel8/common/base.dockerfile.j2 index cb3fe2ce..e7357d17 100644 --- a/templates/rhel8/common/base.dockerfile.j2 +++ b/templates/rhel8/common/base.dockerfile.j2 @@ -27,8 +27,6 @@ ENV INTEL_OPENVINO_DIR /opt/intel/openvino RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR}/.distribution && \ touch ${INTEL_OPENVINO_DIR}/.distribution/docker -{% if 'docker' == rhel_platform %} -# ----------------- FROM registry.access.redhat.com/ubi8 AS ov_base LABEL name="rhel8_{{ distribution }}" \ @@ -44,11 +42,10 @@ USER root SHELL ["/bin/bash", "-xo", "pipefail", "-c"] -{% endif %} # adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd -f render && usermod -a -G render openvino && \ chown openvino -R /home/openvino {% if 'runtime' == distribution %} diff --git a/templates/ubuntu22/common/base.dockerfile.j2 b/templates/ubuntu22/common/base.dockerfile.j2 index 8c6877e4..8975af85 100644 --- a/templates/ubuntu22/common/base.dockerfile.j2 +++ b/templates/ubuntu22/common/base.dockerfile.j2 @@ -27,7 +27,7 @@ RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR} # adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd -f render && usermod -a -G render openvino && \ chown openvino -R /home/openvino WORKDIR /thirdparty diff --git a/templates/ubuntu24/common/base.dockerfile.j2 b/templates/ubuntu24/common/base.dockerfile.j2 index d73f734b..c726fa5d 100644 --- a/templates/ubuntu24/common/base.dockerfile.j2 +++ b/templates/ubuntu24/common/base.dockerfile.j2 @@ -27,7 +27,7 @@ RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR} # adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \ - grep -E "^UMASK" /etc/login.defs && groupadd render && usermod -a -G render openvino && \ + grep -E "^UMASK" /etc/login.defs && groupadd -f render && usermod -a -G render openvino && \ chown openvino -R /home/openvino WORKDIR /thirdparty From 39619f0f7235af9256e72cbb8ee244894b386479 Mon Sep 17 00:00:00 2001 From: aanokhov Date: Thu, 8 Jan 2026 14:15:53 +0100 Subject: [PATCH 3/3] Updated adding 'render' group for ov-base images. Removed useless if-case for rhel8 --- templates/rhel8/common/base.dockerfile.j2 | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/templates/rhel8/common/base.dockerfile.j2 b/templates/rhel8/common/base.dockerfile.j2 index e7357d17..a3946223 100644 --- a/templates/rhel8/common/base.dockerfile.j2 +++ b/templates/rhel8/common/base.dockerfile.j2 @@ -24,24 +24,6 @@ ENV INTEL_OPENVINO_DIR /opt/intel/openvino {% for pre_command in pre_commands %} {{ pre_command|safe }} {% endfor %} -RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir -p ${INTEL_OPENVINO_DIR}/.distribution && \ - touch ${INTEL_OPENVINO_DIR}/.distribution/docker - -FROM registry.access.redhat.com/ubi8 AS ov_base - -LABEL name="rhel8_{{ distribution }}" \ - maintainer="openvino_docker@intel.com" \ - vendor="Intel Corporation" \ - version="{{ product_version }}" \ - release="{{ product_version }}" \ - summary="Provides the latest release of Intel(R) Distribution of OpenVINO(TM) toolkit." \ - description="This is the {{ distribution }} image for Intel(R) Distribution of OpenVINO(TM) toolkit on RHEL UBI 8" - -WORKDIR / -USER root - -SHELL ["/bin/bash", "-xo", "pipefail", "-c"] - # adding user openvino to group "render" to use GPU and NPU RUN sed -ri -e 's@^UMASK[[:space:]]+[[:digit:]]+@UMASK 000@g' /etc/login.defs && \