diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2022-07-21 20:09:39 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2022-07-28 18:57:44 +0800 |
commit | fdde909d2e3d8307b24302f7511131f7fd3934db (patch) | |
tree | 383bd53b4d05bfe55e19568ef6edb63d9c5eaf3b /dynamic-layers | |
parent | 79486754252c139aaf3b41e3699bc98785b47891 (diff) | |
download | meta-intel-fdde909d2e3d8307b24302f7511131f7fd3934db.tar.gz |
openvino-inference-engine: fix reproducibility issues
Prevent host paths from getting into target packages. Also prevents
buildpaths warnings for files:
| File /usr/lib/libopenvino.so in package openvino-inference-engine contains reference to TMPDIR [buildpaths]
| File /usr/lib/python3.10/site-packages/openvino/inference_engine/ie_api.so in package openvino-inference-engine-python3 contains reference to TMPDIR [buildpaths]
| File /usr/src/debug/openvino-inference-engine/2022.1-r0/build/src/plugins/intel_cpu/cross-compiled/proposal_imp_disp.cpp in package openvino-inference-engine-src contains reference to TMPDIR
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers')
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch | 19 | ||||
-rw-r--r-- | dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch new file mode 100644 index 00000000..45ed0d27 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | Change the working directory to source to workaround cython | ||
2 | embedding absolute path to the pyx file in output. | ||
3 | |||
4 | Upstream-Status: Inappropriate [OE build specific] | ||
5 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
6 | |||
7 | diff --git a/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake b/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake | ||
8 | index f14662ad50..8d199fe328 100644 | ||
9 | --- a/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake | ||
10 | +++ b/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake | ||
11 | @@ -259,7 +259,7 @@ function( compile_pyx _name generated_file ) | ||
12 | add_custom_command( OUTPUT ${_generated_file} | ||
13 | COMMAND ${CYTHON_EXECUTABLE} | ||
14 | ARGS ${cxx_arg} ${include_directory_arg} ${version_arg} | ||
15 | - ${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS} | ||
16 | + ${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS} -w ${CMAKE_CURRENT_SOURCE_DIR} | ||
17 | --output-file ${_generated_file} ${pyx_locations} | ||
18 | DEPENDS ${pyx_locations} ${pxd_dependencies} ${pxi_dependencies} | ||
19 | IMPLICIT_DEPENDS ${pyx_lang} ${c_header_dependencies} | ||
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb index 5814380d..e4b0414b 100644 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=r | |||
17 | git://github.com/openvinotoolkit/open_model_zoo.git;protocol=https;destsuffix=git/thirdparty/open_model_zoo;name=omz;branch=releases/2022/1 \ | 17 | git://github.com/openvinotoolkit/open_model_zoo.git;protocol=https;destsuffix=git/thirdparty/open_model_zoo;name=omz;branch=releases/2022/1 \ |
18 | file://0001-inference-engine-use-system-installed-packages.patch \ | 18 | file://0001-inference-engine-use-system-installed-packages.patch \ |
19 | file://0002-inference-engine-installation-fixes.patch \ | 19 | file://0002-inference-engine-installation-fixes.patch \ |
20 | file://cython-cmake.patch \ | ||
20 | " | 21 | " |
21 | 22 | ||
22 | SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e" | 23 | SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e" |
@@ -92,6 +93,11 @@ PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} | |||
92 | PACKAGECONFIG[vpu] = "-DENABLE_INTEL_MYRIAD=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_INTEL_MYRIAD=OFF,,${PN}-vpu-firmware" | 93 | PACKAGECONFIG[vpu] = "-DENABLE_INTEL_MYRIAD=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_INTEL_MYRIAD=OFF,,${PN}-vpu-firmware" |
93 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" | 94 | PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" |
94 | 95 | ||
96 | do_configure:prepend() { | ||
97 | # Dont set PROJECT_ROOT_DIR | ||
98 | sed -i -e 's:\${CMAKE_CURRENT_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt | ||
99 | } | ||
100 | |||
95 | do_install:append() { | 101 | do_install:append() { |
96 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | 102 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then |
97 | install -d ${D}${datadir}/openvino | 103 | install -d ${D}${datadir}/openvino |
@@ -108,6 +114,8 @@ do_install:append() { | |||
108 | 114 | ||
109 | # Remove the samples source directory. We install the built samples. | 115 | # Remove the samples source directory. We install the built samples. |
110 | rm -rf ${D}/usr/samples | 116 | rm -rf ${D}/usr/samples |
117 | |||
118 | sed -i -e 's:^#include.*imp.hpp"$:#include "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/git/src/plugins/intel_cpu/src/nodes/proposal_imp.hpp":g;' ${B}/src/plugins/intel_cpu/cross-compiled/proposal_imp_disp.cpp | ||
111 | } | 119 | } |
112 | 120 | ||
113 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR | 121 | # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR |