Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkat0/hello-wasi-nn
https://github.com/tkat0/hello-wasi-nn
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkat0/hello-wasi-nn
- Owner: tkat0
- License: apache-2.0
- Created: 2020-12-16T22:48:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T11:37:21.000Z (11 months ago)
- Last Synced: 2024-10-10T19:09:07.277Z (about 1 month ago)
- Language: Dockerfile
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hello-wasi-nn
download test data.
```bash
FIXTURE=https://github.com/intel/openvino-rs/raw/main/crates/openvino/tests/fixtures/alexnet
TMP_DIR=./tmp
mkdir -p $TMP_DIRwget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/alexnet.bin
wget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/alexnet.xml
wget --no-clobber --directory-prefix=$TMP_DIR $FIXTURE/tensor-1x3x227x227-f32.bgr
```build and run docker image to execute wasmtime with wasi-nn enabled.
```bash
$ docker-compose run dev
```build test application.
```bash
root@0481d31f4627:/work/wasmtime/crates/wasi-nn/examples/classification-example# cargo build --release --target=wasm32-wasi
root@0481d31f4627:/work/wasmtime/crates/wasi-nn/examples/classification-example# cp /work/wasmtime/target/wasm32-wasi/release/wasi-nn-example.wasm /work/tmp
```run test application
```bash
root@0481d31f4627:/work# wasmtime --mapdir fixture::./tmp ./tmp/wasi-nn-example.wasm
Read graph XML, first 50 characters: