ci: unpin the wasi-nn tasks from an older Ubuntu (#6089)

* ci: unpin the wasi-nn tasks from an older Ubuntu

Previously, OpenVINO's lack of APT packages for Ubuntu 22.04 (`jammy`)
prevented us from upgrading the GitHub runner to use `ubuntu-latest`. I
updated the `install-openvino-action` to substitute in the `focal`
packages in this case (this is what the OpenVINO team considers the fix)
so this pin should no longer be necessary. Fixes #5408.

(Run all CI actions: prtest:full)

* vet: audit the openvino version bump
This commit is contained in:
Andrew Brown
2023-04-06 17:44:16 +02:00
committed by GitHub
parent fb0faa3f06
commit 5ba0d696b7
6 changed files with 35 additions and 20 deletions

View File

@@ -1,10 +1,10 @@
#!/bin/bash
# The following script demonstrates how to execute a machine learning inference using the wasi-nn module optionally
# compiled into Wasmtime. Calling it will download the necessary model and tensor files stored separately in $FIXTURE
# into $TMP_DIR (optionally pass a directory with existing files as the first argument to re-try the script). Then,
# it will compile the example code in crates/wasi-nn/tests/example into a Wasm file that is subsequently
# executed with the Wasmtime CLI.
# The following script demonstrates how to execute a machine learning inference using the wasi-nn
# module optionally compiled into Wasmtime. Calling it will download the necessary model and tensor
# files stored separately in $FIXTURE into $TMP_DIR (optionally pass a directory with existing files
# as the first argument to re-try the script). Then, it will compile the example code in
# crates/wasi-nn/tests/example into a Wasm file that is subsequently executed with the Wasmtime CLI.
set -e
WASMTIME_DIR=$(dirname "$0" | xargs dirname)
FIXTURE=https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/mobilenet
@@ -18,12 +18,8 @@ else
REMOVE_TMP_DIR=0
fi
# Inform the environment of OpenVINO library locations. Then we use OPENVINO_INSTALL_DIR below to avoid building all of
# OpenVINO from source (quite slow).
source /opt/intel/openvino_2022/setupvars.sh
# Build Wasmtime with wasi-nn enabled; we attempt this first to avoid extra work if the build fails.
OPENVINO_INSTALL_DIR=/opt/intel/openvino_2022 cargo build -p wasmtime-cli --features wasi-nn
cargo build -p wasmtime-cli --features wasi-nn
# Download all necessary test fixtures to the temporary directory.
wget --no-clobber $FIXTURE/mobilenet.bin --output-document=$TMP_DIR/model.bin