-
Notifications
You must be signed in to change notification settings - Fork 39
77 lines (68 loc) · 2.27 KB
/
build_openvino_mobilenet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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