diff --git a/.github/workflows/build_openvino_mobilenet.yml b/.github/workflows/build_openvino_mobilenet.yml index d60fb10..8f75609 100644 --- a/.github/workflows/build_openvino_mobilenet.yml +++ b/.github/workflows/build_openvino_mobilenet.yml @@ -42,8 +42,8 @@ jobs: - name: Install OpenVINO env: - OPENVINO_VERSION: "2021.4.582" - OPENVINO_YEAR: "2021" + OPENVINO_VERSION: "2023.0.0" + OPENVINO_YEAR: "2023" working-directory: scripts run: | bash install_openvino.sh @@ -51,9 +51,8 @@ jobs: - name: Install WasmEdge with Wasi-NN OpenVINO plugin env: CMAKE_BUILD_TYPE: "Release" - VERSION: "0.13.1" + VERSION: "0.13.2" run: | - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino ldconfig @@ -61,7 +60,6 @@ jobs: - name: Build and run openvino-mobilenet-raw working-directory: openvino-mobilenet-raw run: | - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig bash download_mobilenet.sh cd rust @@ -72,7 +70,6 @@ jobs: - name: Build and run openvino-mobilenet-image working-directory: openvino-mobilenet-image run: | - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig bash download_mobilenet.sh cd rust diff --git a/.github/workflows/build_openvino_road_seg_adas.yml b/.github/workflows/build_openvino_road_seg_adas.yml index 79426eb..a580f05 100644 --- a/.github/workflows/build_openvino_road_seg_adas.yml +++ b/.github/workflows/build_openvino_road_seg_adas.yml @@ -41,8 +41,8 @@ jobs: - name: Install OpenVINO env: - OPENVINO_VERSION: "2021.4.582" - OPENVINO_YEAR: "2021" + OPENVINO_VERSION: "2023.0.0" + OPENVINO_YEAR: "2023" working-directory: scripts run: | bash install_openvino.sh @@ -50,9 +50,8 @@ jobs: - name: Install WasmEdge with Wasi-NN OpenVINO plugin env: CMAKE_BUILD_TYPE: "Release" - VERSION: "0.13.1" + VERSION: "0.13.2" run: | - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino ldconfig @@ -60,7 +59,6 @@ jobs: - name: Build and run openvino-road-segmentation-adas working-directory: openvino-road-segmentation-adas run: | - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig cd openvino-road-seg-adas cargo build --target=wasm32-wasi --release diff --git a/.github/workflows/tflite.yml b/.github/workflows/tflite.yml index 41ce9da..df68367 100644 --- a/.github/workflows/tflite.yml +++ b/.github/workflows/tflite.yml @@ -32,7 +32,7 @@ jobs: - name: Install WasmEdge + WASI-NN + TFLite run: | - VERSION=0.13.1 + VERSION=0.13.2 TFVERSION=2.12.0 curl -s -L -O --remote-name-all https://github.com/second-state/WasmEdge-tensorflow-deps/releases/download/TF-2.12.0-CC/WasmEdge-tensorflow-deps-TFLite-TF-$TFVERSION-CC-manylinux2014_x86_64.tar.gz tar -zxf WasmEdge-tensorflow-deps-TFLite-TF-$TFVERSION-CC-manylinux2014_x86_64.tar.gz diff --git a/README.md b/README.md index 9163d3c..d5d567d 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,21 @@ This project provides the examples of high-level [wasi-nn] bindings and WasmEdge ### Prerequisites +#### OpenVINO Installation + +Developers should install the [OpenVINO] first before build and run WasmEdge with wasi-nn and the examples. +For this project, we use the version `2023.0.0`. Please refer to [WasmEdge Docs](https://wasmedge.org/docs/contribute/source/plugin/wasi_nn) and [OpenVINO™](https://docs.openvino.ai/2023.0/openvino_docs_install_guides_installing_openvino_apt.html)(2023) + +```bash +wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2023.list +sudo apt update +sudo apt-get -y install openvino +ldconfig +``` +[OpenVINO]: https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html + #### Rust Installation For building the WASM files from rust source, please refer to the [Rust Official Site](https://www.rust-lang.org/tools/install) for the Rust installation. diff --git a/openvino-mobilenet-image/README.md b/openvino-mobilenet-image/README.md index 66c1195..6b722ae 100644 --- a/openvino-mobilenet-image/README.md +++ b/openvino-mobilenet-image/README.md @@ -24,12 +24,10 @@ This example demonstrates how to use WasmEdge WASI-NN OpenVINO plugin to perform - Install OpenVINO +Please refer to [WasmEdge Docs](https://wasmedge.org/docs/contribute/source/plugin/wasi_nn) and [OpenVINO™](https://docs.openvino.ai/2023.0/openvino_docs_install_guides_installing_openvino_apt.html)(2023) for the installation process. + ```bash - export OPENVINO_VERSION=2021.4.582 - export OPENVINO_YEAR=2021 bash WasmEdge-WASINN-examples/scripts/install_openvino.sh - - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig ``` @@ -37,7 +35,7 @@ This example demonstrates how to use WasmEdge WASI-NN OpenVINO plugin to perform ```bash export CMAKE_BUILD_TYPE=Release - export VERSION=0.13.1 + export VERSION=0.13.2 curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino ldconfig diff --git a/openvino-mobilenet-raw/README.md b/openvino-mobilenet-raw/README.md index 6aec8d3..0cdafc1 100644 --- a/openvino-mobilenet-raw/README.md +++ b/openvino-mobilenet-raw/README.md @@ -24,12 +24,10 @@ This example demonstrates how to use WasmEdge WASI-NN OpenVINO plugin to perform - Install OpenVINO +Please refer to [WasmEdge Docs](https://wasmedge.org/docs/contribute/source/plugin/wasi_nn) and [OpenVINO™](https://docs.openvino.ai/2023.0/openvino_docs_install_guides_installing_openvino_apt.html)(2023) for the installation process. + ```bash - export OPENVINO_VERSION=2021.4.582 - export OPENVINO_YEAR=2021 bash WasmEdge-WASINN-examples/scripts/install_openvino.sh - - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig ``` @@ -37,7 +35,7 @@ This example demonstrates how to use WasmEdge WASI-NN OpenVINO plugin to perform ```bash export CMAKE_BUILD_TYPE=Release - export VERSION=0.13.1 + export VERSION=0.13.2 curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino ldconfig diff --git a/openvino-road-segmentation-adas/README.md b/openvino-road-segmentation-adas/README.md index aa37643..d475879 100644 --- a/openvino-road-segmentation-adas/README.md +++ b/openvino-road-segmentation-adas/README.md @@ -33,12 +33,10 @@ The model files and the images used for this demonstration are from the [Intel o - Install OpenVINO +Please refer to [WasmEdge Docs](https://wasmedge.org/docs/contribute/source/plugin/wasi_nn) and [OpenVINO™](https://docs.openvino.ai/2023.0/openvino_docs_install_guides_installing_openvino_apt.html)(2023) for the installation process. + ```bash - export OPENVINO_VERSION=2021.4.582 - export OPENVINO_YEAR=2021 bash WasmEdge-WASINN-examples/scripts/install_openvino.sh - - bash /opt/intel/openvino_2021/bin/setupvars.sh ldconfig ``` @@ -46,7 +44,7 @@ The model files and the images used for this demonstration are from the [Intel o ```bash export CMAKE_BUILD_TYPE=Release - export VERSION=0.13.1 + export VERSION=0.13.2 curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino ldconfig diff --git a/scripts/install_openvino.sh b/scripts/install_openvino.sh index 83f6a0a..dba1584 100755 --- a/scripts/install_openvino.sh +++ b/scripts/install_openvino.sh @@ -1,28 +1,9 @@ #!/usr/bin/env bash - -if [[ ! -v "${OPENVINO_VERSION}" ]]; then - OPENVINO_VERSION="2021.4.582" -fi -if [[ ! -v "${OPENVINO_YEAR}" ]]; then - OPENVINO_YEAR="2021" -fi - set -e -echo "Installing OpenVINO with version ${OPENVINO_VERSION}" -curl -sSL https://apt.repos.intel.com/openvino/$OPENVINO_YEAR/GPG-PUB-KEY-INTEL-OPENVINO-$OPENVINO_YEAR | gpg --dearmor > /usr/share/keyrings/GPG-PUB-KEY-INTEL-OPENVINO-$OPENVINO_YEAR.gpg -echo "deb [signed-by=/usr/share/keyrings/GPG-PUB-KEY-INTEL-OPENVINO-$OPENVINO_YEAR.gpg] https://apt.repos.intel.com/openvino/$OPENVINO_YEAR all main" | tee /etc/apt/sources.list.d/intel-openvino-$OPENVINO_YEAR.list +echo "Installing OpenVINO with version 2023.0.0" +wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB +echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | tee /etc/apt/sources.list.d/intel-openvino-2023.list apt update -apt install -y intel-openvino-runtime-ubuntu20-$OPENVINO_VERSION -source /opt/intel/openvino_2021/bin/setupvars.sh +apt-get -y install openvino ldconfig - -echo "*** inspect /etc/ld.so.conf" -cat /etc/ld.so.conf - -echo "*** add new paths to /etc/ld.so.conf" -echo "include /etc/ld.so.conf.d/*.conf" >> /etc/ld.so.conf -echo "/opt/intel/openvino_2021/deployment_tools/ngraph/lib/" >> /etc/ld.so.conf -echo "/opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/" >> /etc/ld.so.conf - -echo "*** inspect /etc/ld.so.conf" -cat /etc/ld.so.conf \ No newline at end of file