Skip to content

Commit 8bc04ca

Browse files
committed
Merge remote-tracking branch 'origin/main' into onur/remove-trt-llm
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
2 parents b472ce5 + bbe0b40 commit 8bc04ca

8 files changed

Lines changed: 408 additions & 226 deletions

File tree

‎.github/actions/test-template/action.yml‎

Lines changed: 44 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -34,57 +34,25 @@ inputs:
3434
description: "Run tests on CPU only"
3535
required: false
3636
default: "false"
37-
azure-client-id:
38-
description: "Azure Client ID"
39-
required: true
40-
azure-tenant-id:
41-
description: "Azure Tenant ID"
42-
required: true
43-
azure-subscription-id:
44-
description: "Azure Subscription ID"
45-
required: true
46-
has-azure-credentials:
47-
description: "Has Azure credentials"
48-
required: false
49-
default: "false"
5037
PAT:
5138
description: "GitHub Personal Access Token"
5239
required: true
40+
container-image:
41+
description: "Pre-built container image to use for test"
42+
required: true
5343
inference-framework:
54-
description: "Inference Framework"
44+
description: "Inference framework extra to install at runtime (trtllm, vllm, trt-onnx, inframework)"
5545
required: true
5646
test-data-path:
5747
description: "Test data path"
5848
required: true
5949
runner:
6050
description: "The GHA runner to use"
6151
required: true
62-
ngc-api-user:
63-
description: "NGC API User"
64-
required: false
65-
ngc-api-key:
66-
description: "NGC API Key"
67-
required: false
6852

6953
runs:
7054
using: "composite"
7155
steps:
72-
- name: Install Azure CLI
73-
if: ${{ inputs.has-azure-credentials == 'true' }}
74-
shell: bash
75-
run: |
76-
echo ::group::Install Azure CLI
77-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
78-
echo ::endgroup::
79-
80-
- name: Azure Login
81-
if: ${{ inputs.has-azure-credentials == 'true' }}
82-
uses: azure/login@v2
83-
with:
84-
client-id: ${{ inputs.azure-client-id }}
85-
tenant-id: ${{ inputs.azure-tenant-id }}
86-
subscription-id: ${{ inputs.azure-subscription-id }}
87-
8856
- name: Install uuidgen
8957
shell: bash -x -e -u -o pipefail {0}
9058
if: ${{ contains(inputs.runner, 'aws') }}
@@ -98,37 +66,6 @@ runs:
9866
path: Export-Deploy
9967

10068

101-
- name: Cache uv
102-
uses: actions/cache@v4
103-
id: cache
104-
with:
105-
path: cache-mount
106-
key: ${{ runner.os }}-uv-${{ hashFiles('**/uv.lock') }}
107-
108-
- name: Login to NGC
109-
if: ${{ inputs.ngc-api-user != '' && inputs.ngc-api-key != '' }}
110-
shell: bash
111-
run: |
112-
echo ::group::Use credentials
113-
echo ${{ inputs.ngc-api-key }} | docker login -u '${{ inputs.ngc-api-user }}' --password-stdin nvcr.io
114-
echo ::endgroup::
115-
116-
- name: Restore Docker cache mounts
117-
uses: reproducible-containers/buildkit-cache-dance@5b81f4d29dc8397a7d341dba3aeecc7ec54d6361
118-
with:
119-
cache-dir: cache-mount
120-
dockerfile: docker/Dockerfile.pytorch
121-
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
122-
123-
- name: Build container
124-
shell: bash
125-
env:
126-
GH_TOKEN: ${{ inputs.PAT }}
127-
run: |
128-
echo ::group::Build test container
129-
docker build -f docker/Dockerfile.pytorch --build-arg INFERENCE_FRAMEWORK=${{ inputs.inference-framework }} --secret id=GH_TOKEN -t export-deploy .
130-
echo ::endgroup::
131-
13269
- name: Start container
13370
shell: bash
13471
run: |
@@ -154,7 +91,7 @@ runs:
15491
--workdir /workspace \
15592
--volume $(pwd)/Export-Deploy:/workspace \
15693
--volume ${{ inputs.test-data-path }}:/home/TestData \
157-
export-deploy \
94+
${{ inputs.container-image }} \
15895
bash -c "sleep $(( ${{ inputs.timeout }} * 60 + 60 ))"
15996
RUN_TEST_EOF
16097
)
@@ -163,6 +100,45 @@ runs:
163100
bash retry_job.sh
164101
echo ::endgroup::
165102
103+
- name: Install framework deps
104+
if: ${{ inputs.inference-framework != 'inframework' }}
105+
shell: bash
106+
run: |
107+
echo ::group::Install ${{ inputs.inference-framework }} dependencies
108+
docker exec nemo_container_${{ github.run_id }} bash -c '
109+
uv sync --extra ${{ inputs.inference-framework }} --locked --all-groups \
110+
--no-install-package torch \
111+
--no-install-package torchvision \
112+
--no-install-package triton \
113+
--no-install-package nvidia-cublas-cu12 \
114+
--no-install-package nvidia-cuda-cupti-cu12 \
115+
--no-install-package nvidia-cuda-nvrtc-cu12 \
116+
--no-install-package nvidia-cuda-runtime-cu12 \
117+
--no-install-package nvidia-cudnn-cu12 \
118+
--no-install-package nvidia-cufft-cu12 \
119+
--no-install-package nvidia-cufile-cu12 \
120+
--no-install-package nvidia-curand-cu12 \
121+
--no-install-package nvidia-cusolver-cu12 \
122+
--no-install-package nvidia-cusparse-cu12 \
123+
--no-install-package nvidia-cusparselt-cu12 \
124+
--no-install-package nvidia-nccl-cu12 \
125+
--no-install-package nvidia-cublas \
126+
--no-install-package nvidia-cuda-cupti \
127+
--no-install-package nvidia-cuda-nvrtc \
128+
--no-install-package nvidia-cuda-runtime \
129+
--no-install-package nvidia-cudnn-cu13 \
130+
--no-install-package nvidia-cufft \
131+
--no-install-package nvidia-cufile \
132+
--no-install-package nvidia-curand \
133+
--no-install-package nvidia-cusolver \
134+
--no-install-package nvidia-cusparse \
135+
--no-install-package nvidia-cusparselt-cu13 \
136+
--no-install-package nvidia-nccl-cu13 \
137+
--no-install-package tensorrt-llm \
138+
--no-install-package vllm
139+
'
140+
echo ::endgroup::
141+
166142
- name: Create run-script
167143
id: create
168144
shell: bash

‎.github/workflows/cicd-main.yml‎

Lines changed: 77 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ jobs:
3333
pre-flight:
3434
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.80.1
3535
with:
36-
default_runner_prefix: ${{ vars.DEFAULT_RUNNER_PREFIX }}
37-
non_nvidia_runner_prefix: ${{ vars.NON_NVIDIA_RUNNER_PREFIX }}
38-
default_test_data_path: ${{ vars.DEFAULT_TEST_DATA_PATH }}
39-
non_nvidia_test_data_path: ${{ vars.NON_NVIDIA_TEST_DATA_PATH }}
36+
default_runner_prefix: nemo-ci-aws-gpu-x2
37+
non_nvidia_runner_prefix: nemo-ci-aws-gpu-x2-ephemeral
38+
default_test_data_path: /mnt/datadrive/TestData/nemo-fw/TestData
39+
non_nvidia_test_data_path: /mnt/datadrive/TestData/nemo-fw/TestData
40+
default_registry: 766267172432.dkr.ecr.us-east-1.amazonaws.com
41+
non_nvidia_registry: 766267172432.dkr.ecr.us-east-1.amazonaws.com
4042
sso_users_filename: ${{ vars.SSO_USERS_FILENAME }}
4143
secrets:
4244
NVIDIA_MANAGEMENT_ORG_PAT: ${{ secrets.NVIDIA_MANAGEMENT_ORG_PAT }}
@@ -82,17 +84,77 @@ jobs:
8284
run: |
8385
echo "Running CI tests"
8486
87+
cicd-container-build:
88+
needs: [pre-flight, cicd-wait-in-queue]
89+
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}
90+
environment: nemo-ci
91+
if: |
92+
(
93+
success()
94+
|| needs.pre-flight.outputs.is_ci_workload == 'true'
95+
|| needs.pre-flight.outputs.force_run_all == 'true'
96+
)
97+
&& !cancelled()
98+
steps:
99+
- name: Checkout
100+
uses: actions/checkout@v6
101+
102+
- name: Login to NGC
103+
uses: docker/login-action@v3
104+
with:
105+
registry: nvcr.io
106+
username: ${{ secrets.NGC_API_USER }}
107+
password: ${{ secrets.NGC_API_KEY }}
108+
109+
- name: Set up Docker Buildx
110+
uses: docker/setup-buildx-action@v3
111+
112+
- name: Compute cache keys
113+
id: cache_keys
114+
shell: bash
115+
run: |
116+
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
117+
KEY="main"
118+
else
119+
PR_NUMBER=$(echo "${{ github.ref_name }}" | grep -oP '^pull-request/\K[0-9]+$' || true)
120+
if [[ -n "$PR_NUMBER" ]]; then
121+
KEY="$PR_NUMBER"
122+
else
123+
KEY=$(echo "${{ github.ref_name }}" | tr '/' '-' | tr -cd '[:alnum:]._-')
124+
fi
125+
fi
126+
REGISTRY="${{ needs.pre-flight.outputs.registry }}"
127+
echo "key=$KEY" | tee -a "$GITHUB_OUTPUT"
128+
echo "cache-to=type=registry,ref=${REGISTRY}/export-deploy:${KEY}-buildcache,mode=max" | tee -a "$GITHUB_OUTPUT"
129+
130+
- name: Build and push
131+
uses: docker/build-push-action@v5
132+
with:
133+
file: ./docker/Dockerfile.pytorch
134+
push: true
135+
context: .
136+
build-args: |
137+
INFERENCE_FRAMEWORK=inframework
138+
cache-from: |
139+
type=registry,ref=${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ steps.cache_keys.outputs.key }}-buildcache
140+
type=registry,ref=${{ needs.pre-flight.outputs.registry }}/export-deploy:main-buildcache
141+
cache-to: ${{ steps.cache_keys.outputs.cache-to }}
142+
tags: |
143+
${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ github.sha }}
144+
secrets: |
145+
GH_TOKEN=${{ secrets.PAT }}
146+
85147
cicd-unit-tests-vllm:
86148
strategy:
87149
fail-fast: false
88150
matrix:
89151
include:
90152
- script: L0_Unit_Tests_GPU
91-
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
153+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
92154
- script: L0_Unit_Tests_CPU
93-
runner: linux-amd64-cpu16
155+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
94156
cpu-only: true
95-
needs: [pre-flight, cicd-wait-in-queue]
157+
needs: [pre-flight, cicd-wait-in-queue, cicd-container-build]
96158
if: |
97159
(
98160
success()
@@ -113,16 +175,11 @@ jobs:
113175
timeout: 60
114176
is_unit_test: "true"
115177
cpu-only: ${{ matrix.cpu-only || false }}
116-
has-azure-credentials: "true"
117-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
118-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
119-
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
120178
PAT: ${{ secrets.PAT }}
179+
container-image: ${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ github.sha }}
121180
inference-framework: vllm
122181
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
123182
runner: ${{ matrix.runner }}
124-
ngc-api-user: ${{ secrets.NGC_API_USER }}
125-
ngc-api-key: ${{ secrets.NGC_API_KEY }}
126183

127184
cicd-e2e-tests-trt-onnx:
128185
needs: [cicd-wait-in-queue, pre-flight]
@@ -146,22 +203,17 @@ jobs:
146203
with:
147204
script: L2_ONNX_TRT
148205
is_optional: ${{ matrix.is_optional || false }}
149-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
150-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
151-
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
152-
has-azure-credentials: true
153206
is_unit_test: "false"
154207
timeout: 60
155208
PAT: ${{ secrets.PAT }}
209+
container-image: ${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ github.sha }}
156210
inference-framework: trt-onnx
157211
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
158-
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
159-
ngc-api-user: ${{ secrets.NGC_API_USER }}
160-
ngc-api-key: ${{ secrets.NGC_API_KEY }}
212+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
161213

162214
cicd-e2e-tests-vllm:
163215
needs: [cicd-unit-tests-vllm, pre-flight]
164-
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
216+
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}
165217
name: ${{ matrix.is_optional && 'PLEASEFIXME_' || '' }}${{ matrix.script }}
166218
environment: nemo-ci
167219
if: |
@@ -179,18 +231,13 @@ jobs:
179231
with:
180232
script: L2_Launch_vLLM
181233
is_optional: ${{ matrix.is_optional || false }}
182-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
183-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
184-
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
185-
has-azure-credentials: true
186234
is_unit_test: "false"
187235
timeout: 60
188236
PAT: ${{ secrets.PAT }}
237+
container-image: ${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ github.sha }}
189238
inference-framework: vllm
190239
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
191-
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
192-
ngc-api-user: ${{ secrets.NGC_API_USER }}
193-
ngc-api-key: ${{ secrets.NGC_API_KEY }}
240+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
194241

195242
cicd-e2e-tests-inframework:
196243
needs: [pre-flight, cicd-unit-tests-vllm]
@@ -212,18 +259,13 @@ jobs:
212259
with:
213260
script: L2_Launch_InFramework
214261
is_optional: ${{ matrix.is_optional || false }}
215-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
216-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
217-
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
218-
has-azure-credentials: true
219262
is_unit_test: "false"
220263
timeout: 60
221264
PAT: ${{ secrets.PAT }}
265+
container-image: ${{ needs.pre-flight.outputs.registry }}/export-deploy:${{ github.sha }}
222266
inference-framework: inframework
223267
test-data-path: ${{ needs.pre-flight.outputs.test_data_path }}
224-
runner: ${{ needs.pre-flight.outputs.runner_prefix }}-gpu-x2
225-
ngc-api-user: ${{ secrets.NGC_API_USER }}
226-
ngc-api-key: ${{ secrets.NGC_API_KEY }}
268+
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
227269

228270
Nemo_CICD_Test:
229271
needs:

‎.github/workflows/config/.secrets.baseline‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ vllm = [
117117
{ index = "pypi", marker = "platform_machine == 'aarch64'" },
118118
]
119119
megatron-bridge = { git = "https://github.com/NVIDIA-NeMo/Megatron-Bridge.git", rev = "4cb379fade7c6b85610db0f7412b3601ae15dea8" }
120+
nvidia-resiliency-ext = { git = "https://github.com/NVIDIA/nvidia-resiliency-ext.git", rev = "b2bb3d728a18795807d9f76c535e005a609a1b01" }
120121
# nemo-toolkit = { git = "https://github.com/NVIDIA/NeMo.git", rev = "main" }
121122

122123
[tool.uv]
@@ -139,6 +140,7 @@ default-groups = ["linting", "build", "test"]
139140
link-mode = "copy"
140141
conflicts = [[{ extra = "vllm" }, { extra = "trt-onnx" }]]
141142
override-dependencies = [
143+
"cachetools>=5.0.0",
142144
"torch; sys_platform == 'never'",
143145
"torchvision; sys_platform == 'never'",
144146
"triton; sys_platform == 'never'",

‎tests/functional_tests/tests_inframework/test_deploy_query_mbridge_ray.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ def teardown_method(self):
3939
self.deploy_proc = None
4040

4141
def test_deploy_ray(self):
42-
mbridge_checkpoint_path = "/home/TestData/megatron_bridge/checkpoints/llama3_145m-mbridge_saved-distckpt"
43-
4442
try:
43+
# Checkpoint created via AutoBridge.import_ckpt("meta-llama/Llama-3.2-1B", "/path/to/checkpoint")
44+
mbridge_checkpoint_path = (
45+
"/home/TestData/export-deploy/checkpoints/mbridge/hf_llama32_1B_mbridge/iter_0000000"
46+
)
47+
4548
# Run Ray deployment
4649
self.deploy_proc = subprocess.Popen(
4750
[

0 commit comments

Comments
 (0)