Skip to content

Commit

Permalink
Shrink runtime images (#288)
Browse files Browse the repository at this point in the history
* reduce installed tools in runtime

* Remove duplicated pip package

* Update ubi image version

* enable tests on ubuntu22 
---------

Co-authored-by: mzegla <[email protected]>
  • Loading branch information
dtrawins and mzegla authored Oct 16, 2023
1 parent 7a00c4d commit c1c33bb
Show file tree
Hide file tree
Showing 22 changed files with 72 additions and 141 deletions.
29 changes: 15 additions & 14 deletions dockerfiles/rhel8/openvino_cg_dev_2023.0.0.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2019-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
FROM registry.access.redhat.com/ubi8:8.7 AS base
FROM registry.access.redhat.com/ubi8:8.8 AS base
# hadolint ignore=DL3002
USER root
WORKDIR /
Expand Down Expand Up @@ -46,7 +46,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 Expand Up @@ -89,12 +89,13 @@ RUN yum install -y \
RUN rm -rf /etc/pki/entitlement && rm -rf /etc/rhsm

RUN python3 -m pip install --no-cache-dir numpy==1.23.1
ARG OPENCV_BRANCH="4.7.0"

ARG OPENCV_BRANCH="377be68d923e40900ac5526242bcf221e3f355e5" # 4.8 with a fix for building tests
WORKDIR /opt/repo
RUN git clone https://github.com/opencv/opencv.git --depth 1 -b ${OPENCV_BRANCH}

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 \
Expand All @@ -111,6 +112,7 @@ RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \
-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 \
Expand Down Expand Up @@ -140,8 +142,8 @@ RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \
-D ENABLE_CXX11=ON \
-D INSTALL_PDB=ON \
-D INSTALL_TESTS=ON \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=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 \
Expand Down Expand Up @@ -184,7 +186,7 @@ CMD ["/bin/bash"]


# -----------------
FROM registry.access.redhat.com/ubi8:8.7 AS ov_base
FROM registry.access.redhat.com/ubi8:8.8 AS ov_base

LABEL name="rhel8_dev" \
maintainer="[email protected]" \
Expand Down Expand Up @@ -228,7 +230,7 @@ RUN sed -i -e 's|https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/

WORKDIR /thirdparty
# hadolint ignore=DL3031, DL3033, SC2012
RUN yum update -y --excludepkgs redhat-release && rpm -qa --qf "%{name}\n" > base_packages.txt && \
RUN rpm -qa --qf "%{name}\n" > base_packages.txt && \
yum install -y ${LGPL_DEPS} && \
${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh -y $INSTALL_PACKAGES && \
if [ "$INSTALL_SOURCES" = "yes" ]; then \
Expand Down Expand Up @@ -264,7 +266,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 Expand Up @@ -315,9 +317,8 @@ RUN yum install -y \

# build samples into ${INTEL_OPENVINO_DIR}/samples/cpp/samples_bin
WORKDIR "${INTEL_OPENVINO_DIR}"/samples/cpp
RUN ./build_samples.sh -b build && \
cp -R build/intel64/Release samples_bin && \
rm -Rf build
RUN ./build_samples.sh -b /tmp/build -i ${INTEL_OPENVINO_DIR}/samples/cpp/samples_bin && \
rm -Rf /tmp/build

# add Model API package
# hadolint ignore=DL3013
Expand Down
35 changes: 9 additions & 26 deletions dockerfiles/rhel8/openvino_cg_runtime_2023.0.0.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2019-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
FROM registry.access.redhat.com/ubi8:8.7 AS base
FROM registry.access.redhat.com/ubi8:8.8 AS base
# hadolint ignore=DL3002
USER root
WORKDIR /
Expand Down Expand Up @@ -46,7 +46,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 All @@ -61,7 +61,7 @@ RUN rm -rf ${INTEL_OPENVINO_DIR}/.distribution && mkdir ${INTEL_OPENVINO_DIR}/.d


# -----------------
FROM registry.access.redhat.com/ubi8:8.7 AS ov_base
FROM registry.access.redhat.com/ubi8:8.8 AS ov_base

LABEL name="rhel8_runtime" \
maintainer="[email protected]" \
Expand Down Expand Up @@ -91,8 +91,8 @@ COPY --from=base /opt/intel /opt/intel



ARG LGPL_DEPS="gcc-c++"
ARG INSTALL_PACKAGES="-c=opencv_req -c=python -c=opencv_opt -c=core"
ARG LGPL_DEPS="bash" # no new packages
ARG INSTALL_PACKAGES="-c=python -c=core"

ARG INSTALL_SOURCES="no"

Expand All @@ -102,7 +102,7 @@ RUN sed -i -e 's|https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/

WORKDIR /thirdparty
# hadolint ignore=DL3031, DL3033, SC2012
RUN yum update -y --excludepkgs redhat-release && rpm -qa --qf "%{name}\n" > base_packages.txt && \
RUN rpm -qa --qf "%{name}\n" > base_packages.txt && \
yum install -y ${LGPL_DEPS} && \
${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh -y $INSTALL_PACKAGES && \
if [ "$INSTALL_SOURCES" = "yes" ]; then \
Expand Down Expand Up @@ -138,7 +138,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 All @@ -150,25 +150,8 @@ ENV PYTHON_VER python3.8

RUN ${PYTHON_VER} -m pip install --upgrade pip

# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION=2023.0.0
ARG OPENVINO_WHEELS_URL
# hadolint ignore=DL3033
RUN yum install -y cmake && yum clean all && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi

# download source for PyPi LGPL packages
WORKDIR /thirdparty
RUN if [ "$INSTALL_SOURCES" = "yes" ]; then \
curl -L https://files.pythonhosted.org/packages/81/41/e6cb9026374771e3bdb4c0fe8ac0c51c693a14b4f72f26275da15f7a4d8b/ethtool-0.14.tar.gz --output ethtool-0.14.tar.gz; \
curl -L https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz --output gpg-1.10.0.tar.gz; \
curl -L https://files.pythonhosted.org/packages/e0/e8/1e4f21800015a9ca153969e85fc29f7962f8f82fc5dbc1ecbdeb9dc54c75/PyGObject-3.28.3.tar.gz --output PyGObject-3.28.3.tar.gz; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

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
Expand Down
19 changes: 5 additions & 14 deletions dockerfiles/ubuntu20/openvino_cg_runtime_2023.0.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 Expand Up @@ -92,8 +92,7 @@ ARG INSTALL_SOURCES="no"
ARG DEPS="tzdata \
curl"

ARG LGPL_DEPS="g++ \
gcc"
ARG LGPL_DEPS=""
ARG INSTALL_PACKAGES="-c=python -c=core"


Expand Down Expand Up @@ -136,7 +135,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 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:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 All @@ -148,16 +147,8 @@ ENV PYTHON_VER python3.8

RUN ${PYTHON_VER} -m pip install --upgrade pip

# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION=2023.0.0
ARG OPENVINO_WHEELS_URL
RUN apt-get update && apt-get install -y --no-install-recommends cmake make && rm -rf /var/lib/apt/lists/* && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

WORKDIR ${INTEL_OPENVINO_DIR}/licensing
# Please use `third-party-programs-docker-runtime.txt` short path to 3d party file if you use the Dockerfile directly from docker_ci/dockerfiles repo folder
Expand Down
19 changes: 5 additions & 14 deletions dockerfiles/ubuntu22/openvino_cg_runtime_2023.0.0.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PYTHONPATH=/opt/intel/openvino/python/python3.10:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 Expand Up @@ -91,8 +91,7 @@ ARG INSTALL_SOURCES="no"
ARG DEPS="tzdata \
curl"

ARG LGPL_DEPS="g++ \
gcc"
ARG LGPL_DEPS=""
ARG INSTALL_PACKAGES="-c=python -c=core"


Expand Down Expand Up @@ -139,7 +138,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 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PYTHONPATH=/opt/intel/openvino/python/python3.10:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
ENV PYTHONPATH=/opt/intel/openvino/python:/opt/intel/openvino/python/python3:/opt/intel/openvino/extras/opencv/python
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 All @@ -151,16 +150,8 @@ ENV PYTHON_VER python3.10

RUN ${PYTHON_VER} -m pip install --upgrade pip

# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION=2023.0.0
ARG OPENVINO_WHEELS_URL
RUN apt-get update && apt-get install -y --no-install-recommends cmake make && rm -rf /var/lib/apt/lists/* && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

WORKDIR ${INTEL_OPENVINO_DIR}/licensing
# Please use `third-party-programs-docker-runtime.txt` short path to 3d party file if you use the Dockerfile directly from docker_ci/dockerfiles repo folder
Expand Down
14 changes: 7 additions & 7 deletions templates/rhel8/common/base.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (C) 2019-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
{%- if 'docker' == rhel_platform %}
FROM registry.access.redhat.com/ubi8:8.7 AS base
FROM registry.access.redhat.com/ubi8:8.8 AS base
{% else %}
FROM registry.access.redhat.com/ubi8:8.7
FROM registry.access.redhat.com/ubi8:8.8
LABEL name="rhel8_{{ distribution }}" \
maintainer="[email protected]" \
vendor="Intel Corporation" \
Expand Down Expand Up @@ -155,7 +155,7 @@ CMD ["/bin/bash"]

{% if 'docker' == rhel_platform %}
# -----------------
FROM registry.access.redhat.com/ubi8:8.7 AS ov_base
FROM registry.access.redhat.com/ubi8:8.8 AS ov_base

LABEL name="rhel8_{{ distribution }}" \
maintainer="[email protected]" \
Expand Down Expand Up @@ -185,8 +185,8 @@ COPY --from=base /opt/intel /opt/intel
{% endif %}

{% if 'runtime' == distribution %}
ARG LGPL_DEPS="gcc-c++"
ARG INSTALL_PACKAGES="-c=opencv_req -c=python -c=opencv_opt -c=core"
ARG LGPL_DEPS="bash" # no new packages
ARG INSTALL_PACKAGES="-c=python -c=core"
{% else %}
ARG LGPL_DEPS="gcc-c++ \
glibc \
Expand All @@ -203,9 +203,9 @@ RUN sed -i -e 's|https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/
WORKDIR /thirdparty
# hadolint ignore=DL3031, DL3033, SC2012
{% if 'openshift' == rhel_platform -%}
RUN rm /etc/rhsm-host && yum update -y --excludepkgs redhat-release && rpm -qa --qf "%{name}\n" > base_packages.txt && \
RUN rm /etc/rhsm-host && rpm -qa --qf "%{name}\n" > base_packages.txt && \
{%- else -%}
RUN yum update -y --excludepkgs redhat-release && rpm -qa --qf "%{name}\n" > base_packages.txt && \
RUN rpm -qa --qf "%{name}\n" > base_packages.txt && \
{%- endif %}
yum install -y ${LGPL_DEPS} && \
${INTEL_OPENVINO_DIR}/install_dependencies/install_openvino_dependencies.sh -y $INSTALL_PACKAGES && \
Expand Down
21 changes: 2 additions & 19 deletions templates/rhel8/dist/runtime.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION={{ product_version }}
ARG OPENVINO_WHEELS_URL
# hadolint ignore=DL3033
RUN yum install -y cmake && yum clean all && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi

# download source for PyPi LGPL packages
WORKDIR /thirdparty
RUN if [ "$INSTALL_SOURCES" = "yes" ]; then \
curl -L https://files.pythonhosted.org/packages/81/41/e6cb9026374771e3bdb4c0fe8ac0c51c693a14b4f72f26275da15f7a4d8b/ethtool-0.14.tar.gz --output ethtool-0.14.tar.gz; \
curl -L https://files.pythonhosted.org/packages/ef/86/c5a34243a932346c59cb25eb49a4d1dec227974209eb9b618d0ed57ea5be/gpg-1.10.0.tar.gz --output gpg-1.10.0.tar.gz; \
curl -L https://files.pythonhosted.org/packages/e0/e8/1e4f21800015a9ca153969e85fc29f7962f8f82fc5dbc1ecbdeb9dc54c75/PyGObject-3.28.3.tar.gz --output PyGObject-3.28.3.tar.gz; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

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
3 changes: 1 addition & 2 deletions templates/ubuntu20/common/base.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ ARG INSTALL_SOURCES="no"
ARG DEPS="tzdata \
curl"
{% if 'runtime' == distribution %}
ARG LGPL_DEPS="g++ \
gcc"
ARG LGPL_DEPS=""
ARG INSTALL_PACKAGES="-c=python -c=core"
{% elif 'dev' == distribution or 'dev_no_samples' == distribution %}
ARG LGPL_DEPS="g++ \
Expand Down
12 changes: 2 additions & 10 deletions templates/ubuntu20/dist/runtime.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION={{ product_version }}
ARG OPENVINO_WHEELS_URL
RUN apt-get update && apt-get install -y --no-install-recommends cmake make && rm -rf /var/lib/apt/lists/* && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

WORKDIR ${INTEL_OPENVINO_DIR}/licensing
# Please use `third-party-programs-docker-runtime.txt` short path to 3d party file if you use the Dockerfile directly from docker_ci/dockerfiles repo folder
Expand Down
3 changes: 1 addition & 2 deletions templates/ubuntu22/common/base.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ ARG INSTALL_SOURCES="no"
ARG DEPS="tzdata \
curl"
{% if 'runtime' == distribution %}
ARG LGPL_DEPS="g++ \
gcc"
ARG LGPL_DEPS=""
ARG INSTALL_PACKAGES="-c=python -c=core"
{% elif 'dev' == distribution or 'dev_no_samples' == distribution %}
ARG LGPL_DEPS="g++ \
Expand Down
12 changes: 2 additions & 10 deletions templates/ubuntu22/dist/runtime.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# runtime package
WORKDIR ${INTEL_OPENVINO_DIR}
ARG OPENVINO_WHEELS_VERSION={{ product_version }}
ARG OPENVINO_WHEELS_URL
RUN apt-get update && apt-get install -y --no-install-recommends cmake make && rm -rf /var/lib/apt/lists/* && \
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
${PYTHON_VER} -m pip install --no-cache-dir openvino=="$OPENVINO_WHEELS_VERSION" ; \
else \
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="$OPENVINO_WHEELS_VERSION" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL" ; \
fi
# Install OpenVINO python API dependency
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4

WORKDIR ${INTEL_OPENVINO_DIR}/licensing
# Please use `third-party-programs-docker-runtime.txt` short path to 3d party file if you use the Dockerfile directly from docker_ci/dockerfiles repo folder
Expand Down
Loading

0 comments on commit c1c33bb

Please sign in to comment.