|
7 | 7 |
|
8 | 8 | set -ex |
9 | 9 |
|
10 | | -# NOTE: Run .ci/scripts/setup-openvino.sh before this script to download and |
11 | | -# install OpenVINO when using the openvino backend. |
12 | | - |
13 | 10 | # shellcheck source=/dev/null |
14 | 11 | source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" |
15 | 12 |
|
@@ -79,10 +76,13 @@ if [[ "${MODE}" =~ .*openvino.* ]]; then |
79 | 76 | OPENVINO=ON |
80 | 77 | TARGET_LIBS="$TARGET_LIBS openvino_backend " |
81 | 78 |
|
82 | | - # Use existing openvino installation from the root directory |
83 | | - # setup-openvino.sh extracts OpenVINO into openvino/ |
84 | | - source openvino/setupvars.sh |
85 | | - pip install -r backends/openvino/requirements.txt |
| 79 | + # Install specific OpenVINO runtime from pip. |
| 80 | + $PYTHON_EXECUTABLE -m pip install --pre openvino==2026.1.0.dev20260131 --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly |
| 81 | + $PYTHON_EXECUTABLE -m pip install -r backends/openvino/requirements.txt |
| 82 | + |
| 83 | + # Set OPENVINO_LIB_PATH so the C++ demo runner can also find libopenvino_c.so. |
| 84 | + OPENVINO_LIB_PATH=$($PYTHON_EXECUTABLE -c "import openvino, os, glob; print(sorted(glob.glob(os.path.join(os.path.dirname(openvino.__file__), 'libs', 'libopenvino_c.so*')))[-1])") |
| 85 | + export OPENVINO_LIB_PATH |
86 | 86 | else |
87 | 87 | OPENVINO=OFF |
88 | 88 | fi |
|
96 | 96 |
|
97 | 97 | which "${PYTHON_EXECUTABLE}" |
98 | 98 |
|
| 99 | +TORCH_URL=https://download.pytorch.org/whl/cpu |
99 | 100 |
|
100 | 101 | DIR="examples/models/yolo26" |
101 | | -$PYTHON_EXECUTABLE -m pip install --upgrade-strategy only-if-needed -r ${DIR}/requirements.txt |
| 102 | +$PYTHON_EXECUTABLE -m pip install --upgrade-strategy only-if-needed --extra-index-url "$TORCH_URL" -r ${DIR}/requirements.txt |
102 | 103 |
|
103 | 104 | cmake_install_executorch_libraries() { |
104 | 105 | rm -rf cmake-out |
@@ -135,7 +136,7 @@ cmake_install_executorch_libraries() { |
135 | 136 |
|
136 | 137 | echo $TARGET_LIBS |
137 | 138 | export CMAKE_BUILD_ARGS="--target $TARGET_LIBS" |
138 | | - pip install . --no-build-isolation |
| 139 | + $PYTHON_EXECUTABLE -m pip install . --no-build-isolation |
139 | 140 | } |
140 | 141 |
|
141 | 142 | cmake_build_demo() { |
|
0 commit comments