Skip to content

Commit 7fce04c

Browse files
author
Copilot
committed
fix ci
1 parent ff39415 commit 7fce04c

File tree

2 files changed

+62
-19
lines changed

2 files changed

+62
-19
lines changed

.github/workflows/pr-test.yml

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929

3030
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'run-ci-short'))
3131

32+
3233
runs-on: self-hosted
3334
container:
3435
image: slimerl/slime:latest
@@ -47,6 +48,7 @@ jobs:
4748
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
4849
-v /mnt/nvme0n1/slime_ci/models:/root/models
4950
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
51+
5052
strategy:
5153
fail-fast: false
5254
matrix:
@@ -66,10 +68,12 @@ jobs:
6668
- name: Checkout repository
6769
uses: actions/checkout@v4
6870

71+
6972
- name: Install
7073
shell: bash
7174
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
7275

76+
7377
- name: Execute
7478
shell: bash
7579
run: |
@@ -87,6 +91,7 @@ jobs:
8791

8892
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'run-ci-megatron'))
8993

94+
9095
runs-on: self-hosted
9196
container:
9297
image: slimerl/slime:latest
@@ -105,6 +110,7 @@ jobs:
105110
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
106111
-v /mnt/nvme0n1/slime_ci/models:/root/models
107112
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
113+
108114
strategy:
109115
fail-fast: false
110116
matrix:
@@ -124,10 +130,12 @@ jobs:
124130
- name: Checkout repository
125131
uses: actions/checkout@v4
126132

133+
127134
- name: Install
128135
shell: bash
129136
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
130137

138+
131139
- name: Execute
132140
shell: bash
133141
run: |
@@ -145,6 +153,7 @@ jobs:
145153

146154
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'run-ci-precision'))
147155

156+
148157
runs-on: self-hosted
149158
container:
150159
image: slimerl/slime:latest
@@ -163,6 +172,7 @@ jobs:
163172
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
164173
-v /mnt/nvme0n1/slime_ci/models:/root/models
165174
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
175+
166176
strategy:
167177
fail-fast: false
168178
matrix:
@@ -182,10 +192,12 @@ jobs:
182192
- name: Checkout repository
183193
uses: actions/checkout@v4
184194

195+
185196
- name: Install
186197
shell: bash
187198
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
188199

200+
189201
- name: Execute
190202
shell: bash
191203
run: |
@@ -203,6 +215,7 @@ jobs:
203215

204216
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'run-ci-ckpt'))
205217

218+
206219
runs-on: self-hosted
207220
container:
208221
image: slimerl/slime:latest
@@ -221,6 +234,7 @@ jobs:
221234
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
222235
-v /mnt/nvme0n1/slime_ci/models:/root/models
223236
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
237+
224238
strategy:
225239
fail-fast: false
226240
matrix:
@@ -240,10 +254,12 @@ jobs:
240254
- name: Checkout repository
241255
uses: actions/checkout@v4
242256

257+
243258
- name: Install
244259
shell: bash
245260
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
246261

262+
247263
- name: Execute
248264
shell: bash
249265
run: |
@@ -261,24 +277,9 @@ jobs:
261277

262278
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
263279

264-
runs-on: self-hosted
265-
container:
266-
image: slimerl/slime:latest
267-
options: >
268-
--gpus all
269-
--ipc=host
270-
--shm-size=16g
271-
--ulimit memlock=-1
272-
--ulimit stack=67108864
273-
--memory=0
274-
--memory-swap=0
275-
-e http_proxy=$http_proxy
276-
-e https_proxy=$https_proxy
277-
-e HTTP_PROXY=$HTTP_PROXY
278-
-e HTTPS_PROXY=$HTTPS_PROXY
279-
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
280-
-v /mnt/nvme0n1/slime_ci/models:/root/models
281-
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
280+
281+
runs-on: ubuntu-latest
282+
282283
strategy:
283284
fail-fast: false
284285
matrix:
@@ -298,9 +299,23 @@ jobs:
298299
- name: Checkout repository
299300
uses: actions/checkout@v4
300301

302+
303+
- name: Set up Python
304+
uses: actions/setup-python@v5
305+
with:
306+
python-version: '3.10'
307+
cache: 'pip'
308+
309+
- name: Install dependencies
310+
shell: bash
311+
run: |
312+
pip install torch --index-url https://download.pytorch.org/whl/cpu
313+
pip install pytest numpy packaging pyyaml omegaconf tqdm httpx pybase64 pylatexenc sympy aiohttp
314+
301315
- name: Install
302316
shell: bash
303-
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
317+
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps
318+
304319

305320
- name: Execute
306321
shell: bash
@@ -319,6 +334,7 @@ jobs:
319334

320335
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, 'run-ci-image'))
321336

337+
322338
runs-on: self-hosted
323339
container:
324340
image: slimerl/slime-test:latest
@@ -337,6 +353,7 @@ jobs:
337353
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
338354
-v /mnt/nvme0n1/slime_ci/models:/root/models
339355
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
356+
340357
strategy:
341358
fail-fast: false
342359
matrix:
@@ -356,10 +373,12 @@ jobs:
356373
- name: Checkout repository
357374
uses: actions/checkout@v4
358375

376+
359377
- name: Install
360378
shell: bash
361379
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
362380

381+
363382
- name: Execute
364383
shell: bash
365384
run: |

.github/workflows/pr-test.yml.j2

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
'e2e-test-plugin-contracts': {
4242
'label': 'run-ci-plugin-contracts',
4343
'always': True,
44+
'cpu': True,
4445
'tests': [
4546
{'test_file': 'plugin_contracts/test_plugin_rollout_contracts.py', 'num_gpus': 0},
4647
{'test_file': 'plugin_contracts/test_plugin_runtime_hook_contracts.py', 'num_gpus': 0},
@@ -97,6 +98,9 @@ jobs:
9798
<% else %>
9899
if: (github.event_name == 'workflow_dispatch') || (github.event.pull_request && contains(github.event.pull_request.labels.*.name, '<< config.label >>'))
99100
<% endif %>
101+
<% if config.get('cpu') %>
102+
runs-on: ubuntu-latest
103+
<% else %>
100104
runs-on: self-hosted
101105
container:
102106
image: << config.image if config.image else 'slimerl/slime:latest' >>
@@ -115,6 +119,7 @@ jobs:
115119
-v /mnt/nvme0n1/slime_ci:/data/slime_ci
116120
-v /mnt/nvme0n1/slime_ci/models:/root/models
117121
-v /mnt/nvme0n1/slime_ci/datasets:/root/datasets
122+
<% endif %>
118123
strategy:
119124
fail-fast: false
120125
matrix:
@@ -133,10 +138,29 @@ jobs:
133138
steps:
134139
- name: Checkout repository
135140
uses: actions/checkout@v4
141+
<% if config.get('cpu') %>
142+
143+
- name: Set up Python
144+
uses: actions/setup-python@v5
145+
with:
146+
python-version: '3.10'
147+
cache: 'pip'
148+
149+
- name: Install dependencies
150+
shell: bash
151+
run: |
152+
pip install torch --index-url https://download.pytorch.org/whl/cpu
153+
pip install pytest numpy packaging pyyaml omegaconf tqdm httpx pybase64 pylatexenc sympy aiohttp
154+
155+
- name: Install
156+
shell: bash
157+
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps
158+
<% else %>
136159

137160
- name: Install
138161
shell: bash
139162
run: cd $GITHUB_WORKSPACE && pip install -e . --no-deps --break-system-packages
163+
<% endif %>
140164

141165
- name: Execute
142166
shell: bash

0 commit comments

Comments
 (0)