Skip to content

OpenVINO Mobilenet Example #506

OpenVINO Mobilenet Example

OpenVINO Mobilenet Example #506

name: OpenVINO Mobilenet Example
on:
schedule:
- cron: "0 0 * * *"
push:
branches: [master]
paths:
- ".github/workflows/build_openvino_mobilenet.yml"
- "openvino-mobilenet-raw/**"
- "openvino-mobilenet-image/**"
- "scripts/install_openvino.sh"
pull_request:
branches: [master]
paths:
- ".github/workflows/build_openvino_mobilenet.yml"
- "openvino-mobilenet-raw/**"
- "openvino-mobilenet-image/**"
- "scripts/install_openvino.sh"
env:
CARGO_TERM_COLOR: always
jobs:
build_openvino_examples:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.71]
container:
image: wasmedge/wasmedge:ubuntu-build-clang
steps:
- name: Checkout Wasi-NN examples
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: wasm32-wasi
- name: Install dependencies
run: |
apt update
apt install -y libtbb2
- name: Install OpenVINO
working-directory: scripts
run: |
bash install_openvino.sh
- name: Install WasmEdge with Wasi-NN OpenVINO plugin
env:
CMAKE_BUILD_TYPE: "Release"
VERSION: "0.13.4"
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v $VERSION -p /usr/local --plugins wasi_nn-openvino
- name: Build and run openvino-mobilenet-raw
working-directory: openvino-mobilenet-raw
run: |
bash download_mobilenet.sh
cd rust
cargo build --target wasm32-wasi --release
cd ..
wasmedge --dir .:. ./rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet.wasm mobilenet.xml mobilenet.bin tensor-1x224x224x3-f32.bgr
- name: Build and run openvino-mobilenet-image
working-directory: openvino-mobilenet-image
run: |
bash download_mobilenet.sh
cd rust
cargo build --target wasm32-wasi --release
cd ..
wasmedge --dir .:. ./rust/target/wasm32-wasi/release/wasmedge-wasinn-example-mobilenet-image.wasm mobilenet.xml mobilenet.bin input.jpg