Skip to content

Commit 834cb09

Browse files
authored
change for OV 2023.0 (#272)
1 parent 2f22550 commit 834cb09

9 files changed

+34
-32
lines changed

requirements.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
setuptools
22
docker!=5.0.0,!=5.0.1 # workarounds for https://github.com/docker/docker-py/issues/2807 and 2885
33
jinja2
4-
pytest
4+
pytest==7.1.3
5+
# https://github.com/pytest-dev/pytest/issues/10428
56
pytest-html
67
pytest-metadata
78
pytest-xdist
8-
requests
9+
requests

requirements_dev.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ flake8-rst-docstrings
2424
more-itertools
2525
packaging
2626
pluggy
27-
pytest
27+
pytest==7.1.3
28+
# https://github.com/pytest-dev/pytest/issues/10428
2829
pytest-html
2930
pytest-metadata
3031
pytest-xdist

templates/rhel8/common/base.dockerfile.j2

-8
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,6 @@ RUN yum update -y --excludepkgs redhat-release && rpm -qa --qf "%{name}\n" > bas
222222
echo "Download source for $(ls | wc -l) third-party packages: $(du -sh)"; fi && \
223223
yum clean all && rm -rf /var/cache/yum
224224

225-
{% if 'autobuild' != rhel_platform %}
226-
COPY ./entitlement /etc/pki/entitlement
227-
COPY ./rhsm-conf /etc/rhsm
228-
COPY ./rhsm-ca /etc/rhsm/ca
229-
{% endif %}
230-
# patch components with vulnerabilites
231-
RUN rm -f /etc/rhsm-host && yum upgrade -y wavpack gstreamer1-plugins-good && yum clean all && rm -rf /var/cache/yum
232-
233225
{% if 'autobuild' != rhel_platform %}
234226
RUN rm -Rf /etc/pki/entitlement /etc/rhsm/ca /etc/rhsm/rhsm.conf
235227
{% endif %}

templates/rhel8/dist/dev.dockerfile.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN echo "export OpenCV_DIR=${INTEL_OPENVINO_DIR}/extras/opencv/cmake" | tee -a
3131
# build samples into ${INTEL_OPENVINO_DIR}/samples/cpp/samples_bin
3232
WORKDIR "${INTEL_OPENVINO_DIR}"/samples/cpp
3333
RUN ./build_samples.sh -b build && \
34-
cp -R build/intel64/Release samples_bin && cp build/intel64/Release/libformat_reader.so . && \
35-
rm -Rf build && mkdir -p build/intel64/Release/lib && mv libformat_reader.so build/intel64/Release/lib/ && rm -Rf samples_bin/lib/
34+
cp -R build/intel64/Release samples_bin && \
35+
rm -Rf build
3636

3737
# add Model API package
3838
# hadolint ignore=DL3013

templates/rhel8/hw/gpu.dockerfile.j2

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# for GPU
22
RUN groupmod -g 44 video
33

4-
# hadolint ignore=DL3031, DL3033
5-
WORKDIR ${INTEL_OPENVINO_DIR}/install_dependencies
6-
RUN ./install_NEO_OCL_driver.sh --no_numa -y && \
7-
yum clean all && rm -rf /var/cache/yum && \
8-
yum remove -y epel-release
4+
RUN dnf install -y libedit ; \
5+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5/intel-gmmlib-22.1.7-i419.el8.x86_64.rpm ; \
6+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5/intel-igc-core-1.0.11485-i419.el8.x86_64.rpm ; \
7+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5/intel-igc-opencl-1.0.11485-i419.el8.x86_64.rpm ; \
8+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5/intel-opencl-22.28.23726.1-i419.el8.x86_64.rpm ; \
9+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5-devel/intel-level-zero-gpu-1.3.23453-i392.el8.x86_64.rpm ; \
10+
rpm -ivh https://repositories.intel.com/graphics/rhel/8.5-devel/level-zero-1.8.1-i392.el8.x86_64.rpm ; \
11+
dnf clean all

templates/ubuntu20/common/base.dockerfile.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ RUN . "${INTEL_OPENVINO_DIR}"/setupvars.sh; \
146146
-D VIDEOIO_PLUGIN_LIST=ffmpeg,gstreamer,mfx \
147147
-D CMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \
148148
-D CMAKE_BUILD_TYPE=Release /opt/repo/opencv && \
149-
ninja && cmake --install . && \
149+
ninja -j $(nproc) && cmake --install . && \
150150
rm -Rf install/bin install/etc/samples
151151

152152
WORKDIR /opt/repo/opencv/build/install

templates/ubuntu20/dist/dev.dockerfile.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ RUN echo "export OpenCV_DIR=${INTEL_OPENVINO_DIR}/extras/opencv/cmake" | tee -a
2424
# build samples into ${INTEL_OPENVINO_DIR}/samples/cpp/samples_bin
2525
WORKDIR ${INTEL_OPENVINO_DIR}/samples/cpp
2626
RUN ./build_samples.sh -b build && \
27-
cp -R build/intel64/Release samples_bin && cp build/intel64/Release/libformat_reader.so . && \
28-
rm -Rf build && mkdir -p build/intel64/Release/lib && mv libformat_reader.so build/intel64/Release/lib/ && rm -Rf samples_bin/lib/
27+
cp -R build/intel64/Release samples_bin && \
28+
rm -Rf build
2929

3030
# add Model API package
3131
# hadolint ignore=DL3013
+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# for GPU
2-
ARG TEMP_DIR=/tmp/opencl
32

4-
WORKDIR ${INTEL_OPENVINO_DIR}/install_dependencies
5-
RUN ./install_NEO_OCL_driver.sh --no_numa -y && \
6-
rm -rf /var/lib/apt/lists/*
3+
RUN apt-get update && apt-get install -y --no-install-recommends gpg gpg-agent && \
4+
curl https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
5+
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-legacy main' | tee /etc/apt/sources.list.d/intel.gpu.focal.list && \
6+
apt-get update && \
7+
apt-get install -y --no-install-recommends \
8+
intel-opencl-icd=22.35.24055+i815~u20.04 \
9+
intel-level-zero-gpu=1.3.24055+i815~u20.04 \
10+
level-zero=1.8.5+i815~u20.04 && \
11+
apt-get purge gpg gpg-agent --yes && apt-get --yes autoremove && \
12+
apt-get clean ; \
13+
rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*

tests/conftest.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,10 @@ def install_omz_commands(request, bash, image_os, distribution, install_openvino
307307
if distribution == 'runtime':
308308
install_dependencies = install_dependencies + ' && apt install -y libopencv-dev python3-opencv'
309309
elif 'rhel' in image_os:
310-
install_dependencies = 'yum install -y git make'
310+
install_dependencies = 'rm -f /etc/rhsm-host'
311311
if distribution == 'runtime':
312-
install_dependencies = (install_dependencies + ' &&'
313-
'yum install -y opencv '
314-
'https://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/'
315-
'opencv-devel-3.4.6-6.el8.x86_64.rpm'
312+
install_dependencies = (install_dependencies + ' && '
313+
'yum install -y opencv git make'
316314
' && pip3 install opencv-python')
317315

318316
install_dev_wheel = install_openvino_dev_wheel('[caffe]') if distribution == 'runtime' else 'true'
@@ -336,9 +334,9 @@ def install_omz_commands(request, bash, image_os, distribution, install_openvino
336334
def install_openvino_dependencies(request):
337335
image_os = request.config.getoption('--image_os')
338336
if 'ubuntu' in image_os:
339-
return '/bin/bash -ac "apt update && apt install -y build-essential curl cmake file"'
337+
return '/bin/bash -ac "apt update && apt install -y build-essential curl cmake file libgl1"'
340338
elif 'rhel' in image_os:
341-
return '/bin/bash -ac "yum install -y make file && pip3 install opencv-python"'
339+
return 'bash -ac "rm -f /etc/rhsm-host && yum install -y make file mesa-libGL && pip3 install opencv-python"'
342340
return ''
343341

344342

0 commit comments

Comments
 (0)