@@ -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 :
0 commit comments