1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14+
1415name : CICD Megatron-LM
1516on :
1617 schedule :
@@ -150,6 +151,7 @@ jobs:
150151
151152 pre-flight :
152153 needs : [is-not-external-contributor]
154+ if : github.repository == 'NVIDIA/Megatron-LM'
153155 uses :
NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected] 154156
155157 linting :
@@ -251,11 +253,6 @@ jobs:
251253 apt-get update
252254 apt-get install -y gh
253255
254- - name : Pull cache
255- run : |
256- docker pull ${{ env.container-registry }}/megatron-lm:main || true
257- docker pull ${{ env.container-registry }}/megatron-lm:${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number }} || true
258-
259256 - name : Get last merged PR
260257 id : cache_from
261258 env :
@@ -271,13 +268,16 @@ jobs:
271268 }
272269 }
273270 }' | jq -r '.data.repository.pullRequests.nodes[].number' | while read -r number; do
274- echo "${{ env.container-registry }}/megatron-lm:$number"
271+ echo "type=registry,ref= ${{ env.container-registry }}/megatron-lm:$number-buildcache,mode=max "
275272 done)
276273
277274 echo "LAST_PRS<<EOF" | tee -a $GITHUB_OUTPUT
278275 echo "$LAST_PRS" | tee -a $GITHUB_OUTPUT
279276 echo "EOF" | tee -a $GITHUB_OUTPUT
280277
278+ - name : Set up Docker Buildx
279+ uses : docker/setup-buildx-action@v3
280+
281281 - name : Build and push
282282 uses : docker/build-push-action@v5
283283 with :
@@ -288,9 +288,11 @@ jobs:
288288 build-args : |
289289 FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:25.09-py3
290290 cache-from : |
291- ${{ env.container-registry }}/megatron-lm:${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number || 0 }}
292- ${{ env.container-registry }}/megatron-lm:main
291+ type=registry,ref= ${{ env.container-registry }}/megatron-lm:${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number || 0 }}-buildcache,mode=max
292+ type=registry,ref= ${{ env.container-registry }}/megatron-lm:main-buildcache,mode=max
293293 ${{ steps.cache_from.outputs.LAST_PRS }}
294+ cache-to : |
295+ type=registry,ref=${{ env.container-registry }}/megatron-lm:${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number || 0 }}-buildcache,mode=max
294296 no-cache : false
295297 tags : |
296298 ${{ env.container-registry }}/megatron-lm:${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number || 0 }}
@@ -368,6 +370,7 @@ jobs:
368370 - cicd-wait-in-queue
369371 - cicd-container-build
370372 - cicd-unit-tests-latest
373+ environment : nemo-ci
371374 if : |
372375 (
373376 success()
@@ -399,21 +402,26 @@ jobs:
399402 - name : Parse functional tests
400403 id : main
401404 env :
402- HAS_RUN_TESTS_LABEL : ${{ steps.has-run-tests-label.outputs.HAS_RUN_TESTS_LABEL }}
405+ HAS_RUN_TESTS_LABEL : ${{ steps.has-run-tests-label.outputs.main }}
403406 run : |
404407 export PYTHONPATH=$(pwd)
405408
406409 if [ "$HAS_RUN_TESTS_LABEL" == "true" ]; then
407410 ARGS=(
408- --scope mr
411+ --scope mr-github
409412 --enable-lightweight-mode
410413 )
414+ echo ":warning: The Run tests label is not yet supported."
411415 else
412416 ARGS=(
413417 --scope mr-slim
414418 )
415419 fi
416420
421+ ARGS=(
422+ --scope mr-slim
423+ )
424+
417425 python tests/test_utils/python_scripts/generate_jet_trigger_job.py \
418426 --n-repeat 5 \
419427 --time-limit 2700 \
0 commit comments