Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
  • Loading branch information
CaptainVincent committed Nov 8, 2023
1 parent f843ab0 commit fbcfecf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-demo-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: 'info'
push:
branches:
- "main"
- "cuda"
paths:
- "demo/**"
- ".github/workflows/build-demo-img.yml"
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/build-installable-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: 'info'
push:
branches:
- "main"
- "cuda"
tags:
- "v*.*.*"
paths:
Expand All @@ -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
Expand Down
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);\
)
Expand Down
2 changes: 1 addition & 1 deletion release/DockerfileLib
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN <<EOT
set -ex
os=$(xx-info os)
plugins=$( [ -n "$PLUGIN" ] && echo "--plugin $PLUGIN" || echo "" )
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --version=0.13.5 --platform=${os^} --machine=$(xx-info march) $plugins
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --platform=${os^} --machine=$(xx-info march) $plugins
mkdir -p /dynlib
./install_dependencies.sh $PLUGIN /dynlib
for file in /root/.wasmedge/plugin/*.so; do
Expand Down

0 comments on commit fbcfecf

Please sign in to comment.