From fbcfecf961a19a3d43b068ee36f0f6564257d419 Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 8 Nov 2023 16:15:53 +0800 Subject: [PATCH] draft --- .github/workflows/build-demo-img.yml | 2 +- .github/workflows/build-installable-img.yml | 21 +++++++++++---------- Makefile | 12 ++---------- demo/wasinn | 2 +- release/DockerfileLib | 2 +- 5 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-demo-img.yml b/.github/workflows/build-demo-img.yml index b55ea4441..b733b8ead 100644 --- a/.github/workflows/build-demo-img.yml +++ b/.github/workflows/build-demo-img.yml @@ -12,7 +12,7 @@ on: default: 'info' push: branches: - - "main" + - "cuda" paths: - "demo/**" - ".github/workflows/build-demo-img.yml" diff --git a/.github/workflows/build-installable-img.yml b/.github/workflows/build-installable-img.yml index 25974a5bf..3b179fe10 100644 --- a/.github/workflows/build-installable-img.yml +++ b/.github/workflows/build-installable-img.yml @@ -12,7 +12,7 @@ on: default: 'info' push: branches: - - "main" + - "cuda" tags: - "v*.*.*" paths: @@ -33,15 +33,16 @@ jobs: id: generate-plugins run: | plugins=() - plugins+=("wasi_nn-openvino") - plugins+=("wasi_crypto") - plugins+=("wasi_nn-pytorch") - plugins+=("wasi_nn-tensorflowlite") - plugins+=("wasi_nn-ggml") - plugins+=("wasmedge_tensorflow") - plugins+=("wasmedge_tensorflowlite") - plugins+=("wasmedge_image") - plugins+=("wasm_bpf") + # plugins+=("wasi_nn-openvino") + # plugins+=("wasi_crypto") + # plugins+=("wasi_nn-pytorch") + # plugins+=("wasi_nn-tensorflowlite") + # plugins+=("wasi_nn-ggml") + plugins+=("wasi_nn-ggml-cuda") + # plugins+=("wasmedge_tensorflow") + # plugins+=("wasmedge_tensorflowlite") + # plugins+=("wasmedge_image") + # plugins+=("wasm_bpf") plugins=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${plugins[@]}") echo "Updated environments list: $plugins" echo "plugins=$plugins" >> $GITHUB_OUTPUT diff --git a/Makefile b/Makefile index 181fdc328..c3722a58a 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ DB_MYSQL_PATH = demo/db/mysql DB_MYSQL_ASYNC_PATH = demo/db/mysql_async MICROSERVICE_DB_PATH = demo/microservice_db WASINN_PATH = demo/wasinn/pytorch-mobilenet-image/rust +WASINN_GGML_PATH = demo/wasinn/wasmedge-ggml-llama-interactive PREOPENS_PATH = demo/rootfs-mounts LLAMA2_PATH = demo/llama2/simple LLAMA2_CHAT_PATH = demo/llama2/chat @@ -226,16 +227,7 @@ endef demo/%: $(call build_img, $(patsubst %/target/wasm32-wasi/$(OPT_PROFILE)/img.tar,demo/%,$*)) -load_demo: $(HYPER_CLIENT_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(HYPER_SERVER_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(REQWEST_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(DB_MYSQL_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(DB_MYSQL_ASYNC_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(MICROSERVICE_DB_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(WASINN_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(PREOPENS_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(LLAMA2_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar \ - $(LLAMA2_CHAT_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar +load_demo: $(WASINN_GGML_PATH)/target/wasm32-wasi/$(OPT_PROFILE)/img.tar $(foreach var,$^,\ sudo ctr -n $(CONTAINERD_NAMESPACE) image import --all-platforms $(var);\ ) diff --git a/demo/wasinn b/demo/wasinn index ca0bf34e9..759147c84 160000 --- a/demo/wasinn +++ b/demo/wasinn @@ -1 +1 @@ -Subproject commit ca0bf34e96fb7e1d317d8fbc84c5bf5e917423b3 +Subproject commit 759147c843662fab66444f5a8d402b7eb68d6b4e diff --git a/release/DockerfileLib b/release/DockerfileLib index 8c8256ab7..8cb2bfb18 100644 --- a/release/DockerfileLib +++ b/release/DockerfileLib @@ -16,7 +16,7 @@ RUN <