Skip to content

Commit

Permalink
ci(test_api_server): update workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Liu <sam@secondstate.io>
  • Loading branch information
apepkuss committed Sep 11, 2024
1 parent 686146e commit e605c96
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/test_api_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- '**/*.rs'
- '**/*.sh'
- '**/.cargo/config.toml'
- "tests/*.hurl"
pull_request:
branches:
- dev
Expand All @@ -27,6 +28,7 @@ on:
- '**/Cargo.toml'
- '**/*.rs'
- '**/*.sh'
- 'tests/*.hurl'

jobs:
test-api-server:
Expand All @@ -51,35 +53,34 @@ jobs:
with:
target: wasm32-wasip1

- name: Install WasmEdge and wasmedge_stablediffusion
- name: Install WasmEdge
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- -v ${{ matrix.wasmedge_version }}
ls -al $HOME/.wasmedge/plugin
- name: Deploy wasmedge_stablediffusion plugin
run: |
curl -LO https://github.com/WasmEdge/WasmEdge/releases/download/0.14.1-rc.4/WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-rc.4-ubuntu20.04_x86_64.tar.gz
tar -xzf WasmEdge-plugin-wasmedge_stablediffusion-0.14.1-rc.4-ubuntu20.04_x86_64.tar.gz -C $HOME/.wasmedge/plugin
ls -al $HOME/.wasmedge/plugin
rm $HOME/.wasmedge/plugin/libwasmedgePluginWasiNN.so
ls -al $HOME/.wasmedge/plugin
- name: Install Hurl
run: |
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/5.0.1/hurl_5.0.1_amd64.deb
sudo apt update && sudo apt install ./hurl_5.0.1_amd64.deb
- name: Download model
run: |
curl -LO https://huggingface.co/second-state/stable-diffusion-v-1-4-GGUF/resolve/main/stable-diffusion-v1-4-Q8_0.gguf
- name: Build sd-api-server on linux
env:
RUSTFLAGS: "--cfg wasmedge --cfg tokio_unstable"
run: |
cargo build --release
cp target/wasm32-wasip1/release/sd-api-server.wasm ./sd-api-server.wasm
- name: Download model
run: |
curl -LO https://huggingface.co/second-state/stable-diffusion-v-1-4-GGUF/resolve/main/stable-diffusion-v1-4-Q8_0.gguf
- name: Start sd-api-server
run: |
nohup $HOME/.wasmedge/bin/wasmedge --dir .:. sd-api-server.wasm --model-name sd-v1.4 --model stable-diffusion-v1-4-Q8_0.gguf --socket-addr 0.0.0.0:8080 > ./start-llamaedge.log 2>&1 &
Expand Down

0 comments on commit e605c96

Please sign in to comment.