Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.ci.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# syntax=docker/dockerfile:1.3-labs

ARG FROM_IMAGE_NAME
FROM ${FROM_IMAGE_NAME} as main

Check warning on line 5 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (gcp, us-east4-docker.pkg.dev/nv-projdgxchipp-20260113193621/megatron-lm, nv...

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${FROM_IMAGE_NAME} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (gcp, us-east4-docker.pkg.dev/nv-projdgxchipp-20260113193621/megatron-lm, nv...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 5 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (aws, 766267172432.dkr.ecr.us-east-1.amazonaws.com, nvidia-ci-aws-gpu-x8)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 5 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (aws, 766267172432.dkr.ecr.us-east-1.amazonaws.com, nvidia-ci-aws-gpu-x8)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${FROM_IMAGE_NAME} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
ENV PIP_CONSTRAINT=""
ENV DEBIAN_FRONTEND=noninteractive
ARG UV_VERSION=0.7.2
Expand Down Expand Up @@ -71,7 +71,7 @@

git clone --branch hybrid-ep https://github.com/deepseek-ai/DeepEP.git
pushd DeepEP
git checkout eb9cee7de5a24193bf09500668d3a619d3d3f3fb
git checkout 34152ae28f80bcc3ee38d7a12cb2ad87cfd4ea72
patch -p1 < /workspace/deepep.patch
popd
TORCH_CUDA_ARCH_LIST="9.0 10.0 12.0" uv pip install --no-build-isolation -v DeepEP/.
Expand All @@ -82,7 +82,7 @@
ENV UV_PYTHON=$UV_PROJECT_ENVIRONMENT/bin/python

##### For NVIDIANS only #####
FROM main as jet

Check warning on line 85 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (gcp, us-east4-docker.pkg.dev/nv-projdgxchipp-20260113193621/megatron-lm, nv...

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 85 in docker/Dockerfile.ci.dev

View workflow job for this annotation

GitHub Actions / cicd-container-build (aws, 766267172432.dkr.ecr.us-east-1.amazonaws.com, nvidia-ci-aws-gpu-x8)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG JET_API_VERSION
ENV PATH="$PATH:/opt/jet/bin"
RUN --mount=type=secret,id=JET_INDEX_URLS bash -ex <<"EOF"
Expand Down
6 changes: 5 additions & 1 deletion tests/unit_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

import os
from datetime import timedelta
from pathlib import Path

import pytest
Expand Down Expand Up @@ -42,7 +43,10 @@ def pytest_sessionfinish(session, exitstatus):
def cleanup():
yield
if torch.distributed.is_initialized():
torch.distributed.barrier()
try:
torch.distributed.barrier(timeout=timedelta(seconds=300))
except Exception:
return
torch.distributed.destroy_process_group()


Expand Down
10 changes: 9 additions & 1 deletion tests/unit_tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ def destroy_model_parallel():
os.environ.pop('NVTE_UNFUSED_ATTN', None)
if not Utils.inited:
return
torch.distributed.barrier()

try:
# Flush pending CUDA work before the barrier so slow ranks don't
# time out while fast ranks tear down process groups.
torch.cuda.synchronize()
torch.distributed.barrier(timeout=timedelta(seconds=300))
except Exception:
Utils.inited = False
return
ps.destroy_model_parallel()
Utils.inited = False

Expand Down
Loading