Skip to content

Commit 5c95633

Browse files
0yi0hydai
authored andcommitted
ci: deprecate runner ubuntu-20.04
* llama.yml Signed-off-by: Yi Huang <[email protected]>
1 parent 18282b4 commit 5c95633

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

.github/workflows/llama.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
build:
2525
strategy:
2626
matrix:
27-
runner: [ubuntu-20.04, macos-m1]
27+
runner: [ubuntu-latest, macos-m1]
2828
wasmedge: ["0.14.1"]
2929
plugin: [wasi_nn-ggml]
3030
job:
3131
- name: "Tiny Llama"
32+
shell: bash
3233
run: |
3334
test -f ~/.wasmedge/env && source ~/.wasmedge/env
3435
cd wasmedge-ggml/llama
@@ -42,6 +43,7 @@ jobs:
4243
$'<|im_start|>system\nYou are an AI assistant<|im_end|>\n<|im_start|>user\nWhere is the capital of Japan?<|im_end|>\n<|im_start|>assistant'
4344
4445
- name: Gemma 2B
46+
shell: bash
4547
run: |
4648
test -f ~/.wasmedge/env && source ~/.wasmedge/env
4749
cd wasmedge-ggml/gemma
@@ -55,6 +57,7 @@ jobs:
5557
'<start_of_turn>user Where is the capital of Japan? <end_of_turn><start_of_turn>model'
5658
5759
- name: Llava v1.6 7B
60+
shell: bash
5861
run: |
5962
test -f ~/.wasmedge/env && source ~/.wasmedge/env
6063
cd wasmedge-ggml/llava
@@ -73,6 +76,7 @@ jobs:
7376
$'You are a helpful, respectful and honest assistant. Always answer as short as possible, while being safe.\nUSER:<image>\nDo you know who drew this painting?\nASSISTANT:'
7477
7578
- name: Llama3 8B
79+
shell: bash
7680
run: |
7781
test -f ~/.wasmedge/env && source ~/.wasmedge/env
7882
cd wasmedge-ggml/llama
@@ -87,6 +91,7 @@ jobs:
8791
$"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you do not know the answer to a question, please do not share false information.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWhat's the capital of Japan?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n"
8892
8993
- name: Llama3 8B (Streaming)
94+
shell: bash
9095
run: |
9196
test -f ~/.wasmedge/env && source ~/.wasmedge/env
9297
cd wasmedge-ggml/llama-stream
@@ -101,6 +106,7 @@ jobs:
101106
$"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you do not know the answer to a question, please do not share false information.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWhat's the capital of Japan?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n"
102107
103108
- name: Multiple Models Example
109+
shell: bash
104110
run: |
105111
test -f ~/.wasmedge/env && source ~/.wasmedge/env
106112
cd wasmedge-ggml/multimodel
@@ -119,6 +125,7 @@ jobs:
119125
'describe this picture please'
120126
121127
- name: Embedding Example (All-MiniLM)
128+
shell: bash
122129
run: |
123130
test -f ~/.wasmedge/env && source ~/.wasmedge/env
124131
cd wasmedge-ggml/embedding
@@ -131,6 +138,7 @@ jobs:
131138
'hello world'
132139
133140
- name: Embedding Example (Llama-2)
141+
shell: bash
134142
run: |
135143
test -f ~/.wasmedge/env && source ~/.wasmedge/env
136144
cd wasmedge-ggml/embedding
@@ -143,6 +151,7 @@ jobs:
143151
'hello world'
144152
145153
- name: RPC Example
154+
shell: bash
146155
run: |
147156
test -f ~/.wasmedge/env && source ~/.wasmedge/env
148157
cd wasmedge-ggml/nnrpc
@@ -156,6 +165,7 @@ jobs:
156165
$'[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you do not know the answer to a question, please do not share false information.\n<</SYS>>\nWhat is the capital of Japan?[/INST]'
157166
158167
- name: Set Input Twice
168+
shell: bash
159169
run: |
160170
test -f ~/.wasmedge/env && source ~/.wasmedge/env
161171
cd wasmedge-ggml/test/set-input-twice
@@ -169,6 +179,7 @@ jobs:
169179
'<start_of_turn>user Where is the capital of Japan? <end_of_turn><start_of_turn>model'
170180
171181
- name: Grammar Example
182+
shell: bash
172183
run: |
173184
test -f ~/.wasmedge/env && source ~/.wasmedge/env
174185
cd wasmedge-ggml/grammar
@@ -182,6 +193,7 @@ jobs:
182193
'JSON object with 5 country names as keys and their capitals as values: '
183194
184195
- name: Model Not Found
196+
shell: bash
185197
run: |
186198
test -f ~/.wasmedge/env && source ~/.wasmedge/env
187199
cd wasmedge-ggml/test/model-not-found
@@ -192,6 +204,7 @@ jobs:
192204
default
193205
194206
- name: Unload
207+
shell: bash
195208
run: |
196209
test -f ~/.wasmedge/env && source ~/.wasmedge/env
197210
cd wasmedge-ggml/test/unload
@@ -204,6 +217,7 @@ jobs:
204217
$'[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you do not know the answer to a question, please do not share false information.\n<</SYS>>\nWhat is the capital of Japan?[/INST]'
205218
206219
- name: JSON Schema
220+
shell: bash
207221
run: |
208222
test -f ~/.wasmedge/env && source ~/.wasmedge/env
209223
cd wasmedge-ggml/json-schema
@@ -217,6 +231,7 @@ jobs:
217231
$'[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always output JSON format string.\n<</SYS>>\nGive me a JSON array of Apple products.[/INST]'
218232
219233
- name: Qwen2-VL
234+
shell: bash
220235
run: |
221236
test -f ~/.wasmedge/env && source ~/.wasmedge/env
222237
cd wasmedge-ggml/qwen2vl
@@ -234,6 +249,7 @@ jobs:
234249
$'<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\n<|vision_start|><image><|vision_end|>what is in this picture?<|im_end|>\n<|im_start|>assistant\n'
235250
236251
- name: Text-to-speech
252+
shell: bash
237253
run: |
238254
test -f ~/.wasmedge/env && source ~/.wasmedge/env
239255
cd wasmedge-ggml/tts
@@ -263,7 +279,7 @@ jobs:
263279
include:
264280
- runner: macos-m1
265281
ngl: 100
266-
- runner: ubuntu-20.04
282+
- runner: ubuntu-latest
267283
wasmedge: "0.14.0"
268284
plugin: wasi_nn-ggml
269285
job:
@@ -280,14 +296,26 @@ jobs:
280296
default \
281297
'<|START_OF_TURN_TOKEN|><|USER_TOKEN|>What is the capital of the United States?<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>'
282298
283-
name: ${{ matrix.runner }} - ${{ matrix.job.name }} - ${{ matrix.wasmedge }} - ${{ matrix.plugin }}
299+
name: ${{ matrix.runner == 'ubuntu-latest' && 'ubuntu:20.04' || matrix.runner }} - ${{ matrix.job.name }} - ${{ matrix.wasmedge }} - ${{ matrix.plugin }}
284300
runs-on: ${{ matrix.runner }}
301+
# set image to `ubuntu:20.04` if runner is `ubuntu-latest`
302+
container: ${{ matrix.runner == 'ubuntu-latest' && fromJSON('{"image":"ubuntu:20.04"}') || null }}
285303
steps:
286304
- uses: actions/checkout@v4
287-
- uses: actions-rust-lang/setup-rust-toolchain@v1
288-
- name: Install Rust target for wasm
305+
306+
- if: ${{ matrix.runner == 'ubuntu-latest' }}
307+
name: Install apt-get packages
289308
run: |
290-
rustup target add wasm32-wasip1
309+
ACCEPT_EULA=Y apt-get update
310+
ACCEPT_EULA=Y apt-get upgrade -y
311+
apt-get install -y wget git curl software-properties-common build-essential
312+
env:
313+
DEBIAN_FRONTEND: noninteractive
314+
315+
- name: Install Rust target for wasm
316+
uses: dtolnay/rust-toolchain@stable
317+
with:
318+
target: wasm32-wasip1
291319

292320
- name: Install WasmEdge + WASI-NN + GGML
293321
run: |
@@ -298,3 +326,4 @@ jobs:
298326

299327
- name: ${{ matrix.job.name }}
300328
run: ${{ matrix.job.run }}
329+
shell: bash

0 commit comments

Comments
 (0)