Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build_openvino_mobilenet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,24 @@ 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

- 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

- 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
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build_openvino_road_seg_adas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,24 @@ 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

- 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

- 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tflite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 3 additions & 5 deletions openvino-mobilenet-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ 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
```

- Install WasmEdge with Wasi-NN OpenVINO plugin

```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
Expand Down
8 changes: 3 additions & 5 deletions openvino-mobilenet-raw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,18 @@ 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
```

- Install WasmEdge with Wasi-NN OpenVINO plugin

```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
Expand Down
8 changes: 3 additions & 5 deletions openvino-road-segmentation-adas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@ 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
```

- Install WasmEdge with Wasi-NN OpenVINO plugin

```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
Expand Down
29 changes: 5 additions & 24 deletions scripts/install_openvino.sh
Original file line number Diff line number Diff line change
@@ -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