Skip to content

Commit 1bffe46

Browse files
committed
Restore Megatron extra-based setup
1 parent 815ffe8 commit 1bffe46

3 files changed

Lines changed: 1595 additions & 99 deletions

File tree

pyproject.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ backend = [
4141
"nvidia-cudnn-frontend<1.21 ; sys_platform == 'linux'",
4242
"vllm @ https://github.com/vivekkalyan/vllm/releases/download/v0.17.0-art1/vllm-0.17.0%2Bart1-cp38-abi3-manylinux_2_31_x86_64.whl ; sys_platform == 'linux'",
4343
]
44+
megatron = [
45+
"torch==2.10.0",
46+
"quack-kernels==0.2.5",
47+
"apex",
48+
"transformer-engine==2.11.0",
49+
"transformer-engine-cu12==2.11.0",
50+
"transformer-engine-torch==2.11.0",
51+
"megatron-core==0.16.0rc0",
52+
"pybind11>=2.13.6",
53+
"megatron-bridge",
54+
"nvidia-ml-py==13.580.82",
55+
"ml-dtypes>=0.5.0 ; python_full_version < '3.13'",
56+
]
4457
langgraph = [
4558
"langchain-core>=0.3.51",
4659
"langgraph>=0.6.2",
@@ -78,7 +91,6 @@ packages = ["src/art", "src/mp_actors"]
7891

7992
[tool.hatch.build.targets.wheel.force-include]
8093
".agents/skills" = "art/skills"
81-
"src/art_megatron_install.py" = "art_megatron_install.py"
8294

8395
[tool.hatch.build]
8496
sources = ["src"]
@@ -226,3 +238,6 @@ dev = [
226238

227239
[tool.uv.sources]
228240
panza = { git = "https://github.com/corbt/panza.git" }
241+
apex = { git = "https://github.com/NVIDIA/apex.git", branch = "25.09" }
242+
megatron-bridge = { git = "https://github.com/NVIDIA-NeMo/Megatron-Bridge.git", rev = "75f2c5ad4afb702b57b4781a00f5291a66bcf183" }
243+
transformer-engine-torch = { git = "https://github.com/NVIDIA/TransformerEngine.git", tag = "v2.11", subdirectory = "transformer_engine/pytorch" }

src/art/megatron/setup.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-9.0}"
77
apt-get update
88
apt-get install -y libcudnn9-headers-cuda-12 ninja-build
99

10-
# Python dependencies are installed through art_megatron_install so
11-
# downstream repos can reuse the same source of truth for versions and VCS pins.
12-
uv run python -m art_megatron_install
10+
# Python dependencies are declared in pyproject.toml extras.
11+
# Keep backend + megatron together so setup does not prune runtime deps (e.g. vllm).
12+
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
13+
repo_root="$(cd -- "${script_dir}/../../.." && pwd)"
14+
cd "${repo_root}"
15+
uv sync --extra backend --extra megatron --frozen --active

0 commit comments

Comments
 (0)