Skip to content

Commit 1610aa5

Browse files
nv-anantsnv-tusharma
authored andcommitted
ci: add support for vllm sanity testing on Github (#2526)
Signed-off-by: Anant Sharma <[email protected]> Co-authored-by: Tushar Sharma <[email protected]> Signed-off-by: nnshah1 <[email protected]>
1 parent 1ab5151 commit 1610aa5

File tree

7 files changed

+630
-452
lines changed

7 files changed

+630
-452
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: NVIDIA Github Validation
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- "pull-request/[0-9]+"
11+
12+
jobs:
13+
build-test:
14+
runs-on: gpu-l40-runners
15+
strategy:
16+
matrix:
17+
framework: [vllm]
18+
include:
19+
- framework: vllm
20+
target: runtime
21+
pytest_marks: "e2e and vllm and gpu_1 and not slow"
22+
# Do not cancel main branch runs
23+
concurrency:
24+
group: ${{ matrix.framework }}-build-test-${{ github.ref_name || github.run_id }}
25+
cancel-in-progress: ${{ github.ref_name != 'main' }}
26+
27+
name: Build and Test - ${{ matrix.framework }}
28+
env:
29+
CONTAINER_ID: test_${{ github.run_id }}_${{ github.run_attempt }}_${{ github.job }}_${{ matrix.framework }}
30+
PYTEST_XML_FILE: pytest_test_report.xml
31+
FRAMEWORK: ${{ matrix.framework }}
32+
TARGET: ${{ matrix.target }}
33+
PYTEST_MARKS: ${{ matrix.pytest_marks }}
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
- name: Login to NGC
41+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
42+
run: |
43+
echo "${{ secrets.NGC_CI_ACCESS_TOKEN }}" | docker login nvcr.io -u '$oauthtoken' --password-stdin
44+
- name: Cleanup
45+
if: always()
46+
run: |
47+
docker system prune -af
48+
- name: Debug
49+
run: |
50+
lsmod | grep nvidia
51+
sudo dmesg | grep -i nvrm || true
52+
nvidia-smi
53+
- name: Build image
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
56+
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
57+
SCCACHE_S3_BUCKET: ${{ secrets.SCCACHE_S3_BUCKET }}
58+
run: |
59+
./container/build.sh --tag ${{ matrix.framework }}:latest \
60+
--target ${{ matrix.target }} \
61+
--framework ${{ matrix.framework }} \
62+
--use-sccache \
63+
--sccache-bucket "$SCCACHE_S3_BUCKET" \
64+
--sccache-region "$AWS_DEFAULT_REGION"
65+
- name: Run pytest
66+
run: |
67+
docker run --rm --gpus all -w /workspace \
68+
--name ${{ env.CONTAINER_ID }}_pytest \
69+
${{ matrix.framework }}:latest \
70+
bash -c "pytest -xsv --basetemp=/tmp --junitxml=${{ env.PYTEST_XML_FILE }} -m \"${{ env.PYTEST_MARKS }}\""

.github/workflows/build-and-test.yml renamed to .github/workflows/container-validation-dynamo.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
153

16-
name: NVIDIA Test Github Validation
4+
name: NVIDIA Github Validation
175

186
on:
197
push:
208
branches:
219
- main
2210
pull_request:
2311

12+
# Do not cancel main branch runs
13+
concurrency:
14+
group: dynamo-build-test-${{ github.ref_name || github.run_id }}
15+
cancel-in-progress: ${{ github.ref_name != 'main' }}
16+
2417
jobs:
2518
build-test:
2619
runs-on:
@@ -53,7 +46,14 @@ jobs:
5346
docker compose up -d nats-server etcd-server
5447
- name: Run Rust checks (block-manager + integration tests)
5548
run: |
56-
docker run -v ${{ github.workspace }}:/workspace -w /workspace/lib/llm --name ${{ env.CONTAINER_ID }}_rust_checks ${{ steps.define_image_tag.outputs.image_tag }} bash -ec 'rustup component add rustfmt clippy && cargo fmt -- --check && cargo clippy --features block-manager --no-deps --all-targets -- -D warnings && cargo test --locked --all-targets --features=block-manager && cargo test --locked --features integration -- --nocapture'
49+
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace/lib/llm \
50+
--name ${{ env.CONTAINER_ID }}_rust_checks \
51+
${{ steps.define_image_tag.outputs.image_tag }} \
52+
bash -ec 'rustup component add rustfmt clippy && \
53+
cargo fmt -- --check && \
54+
cargo clippy --features block-manager --no-deps --all-targets -- -D warnings && \
55+
cargo test --locked --all-targets --features=block-manager && \
56+
cargo test --locked --features integration -- --nocapture'
5757
- name: Cleanup services
5858
if: always()
5959
working-directory: ./deploy
@@ -63,7 +63,10 @@ jobs:
6363
env:
6464
PYTEST_MARKS: "pre_merge or mypy"
6565
run: |
66-
docker run -v ${{ github.workspace }}:/workspace -w /workspace --name ${{ env.CONTAINER_ID }}_pytest ${{ steps.define_image_tag.outputs.image_tag }} bash -c "pytest --basetemp=/tmp --junitxml=${{ env.PYTEST_XML_FILE }} -m \"${{ env.PYTEST_MARKS }}\""
66+
docker run -v ${{ github.workspace }}:/workspace -w /workspace \
67+
--name ${{ env.CONTAINER_ID }}_pytest \
68+
${{ steps.define_image_tag.outputs.image_tag }} \
69+
bash -c "pytest --basetemp=/tmp --junitxml=${{ env.PYTEST_XML_FILE }} -m \"${{ env.PYTEST_MARKS }}\""
6770
- name: Copy test report from test Container
6871
if: always()
6972
run: |

0 commit comments

Comments
 (0)