Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/manual_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
167 changes: 4 additions & 163 deletions templates/rhel8/common/base.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,176 +19,17 @@ 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 && \
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 %}
# -----------------
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"]

{% 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 -f 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"
Expand Down
3 changes: 0 additions & 3 deletions templates/rhel8/dist/dev.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 2 additions & 4 deletions templates/rhel8/env/dev_env.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 2 additions & 4 deletions templates/rhel8/env/runtime_env.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions templates/rhel8/install/copy.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down
Loading