Repository navigation
Conversation
Adds only the EC2 variant of the Miles v0.2.0 AL2023 training DLC, so it can be released ahead of the SageMaker Training image. This is #7062 without the SageMaker target: - No sagemaker-amzn2023.yml config, so CI builds and tests only ec2-amzn2023.yml. - The Dockerfile keeps the base stage the two targets shared, and the ec2 stage is unchanged, so the SageMaker target can be added on top later. - The /opt/ml unit test and the customer-type gates in the multi-GPU and multi-node tests are gone: every test runs on the one image. The image build inputs match #7062 at 18d7803, whose EC2 image passed CI and the manual H100 validation. Signed-off-by: Yadan Wei <weiyadan@amazon.com>
Collaborator
Author
|
/rerun |
The OSS compliance run on the v0.2.0 EC2 image passed and blocked
nothing. It flagged a few gaps this image can close itself:
- psycopg and psycopg-binary 3.3.8 are LGPL-3.0 and had no entry in
THIRD_PARTY_SOURCE_CODE_URLS; the shared generator doesn't know them.
Upstream Miles requires them, so they stay. The Dockerfile now lists
the psycopg source tarball for both at their installed version, which
also covers psycopg-binary's C source (psycopg_c).
- sgl-model-gateway, the router binary built from sgl-router-for-miles,
was the one untracked binary. It now has BUILD_FROM_SOURCE and source
URL entries, as kubectl and Helm do.
- te_fa4_needs_sm90.patch changes an Apache-2.0 file. The added comment
now says Amazon modified it (Apache-2.0 section 4(b)).
- Two upstream sources name a license that isn't open source, and Miles
uses neither, so the sparse checkouts leave them out:
- torchtitan's FLUX model, whose tokenizer cites the Llama 3
Community License, with its two recipe modules;
- SGLang's Hunyuan3D mesh extensions, adapted from Tencent's
non-commercial license. SGLang loads them lazily, only for
Hunyuan3D texture generation.
Unit tests check that the LGPL packages' sources are listed, that every
built binary is tracked, and that no file in the four source checkouts
names such a license, using the same patterns as the review's sweep.
Signed-off-by: Yadan Wei <weiyadan@amazon.com>
1 task done
Two review fixes: - EFA_VERSION is "latest", but the EFA install layer was cached until something before it changed: CACHE_REFRESH was only declared later, in the target stage. It is now declared right before the EFA install, so the layer rebuilds with each day's build and picks up new EFA releases, as #7053 did for the vLLM AL2023 image. The install is the last step of runtime-base, so the venv and source copies before it stay cached; nccl-tests and the base and target stages rebuild with it. - The PR workflow now also runs for changes to the shared test code the pipeline runs: the EFA suite (test/efa), test/requirements.txt, and the harness the multi-GPU and multi-node tests import (test/__init__.py, test/conftest.py and six test_utils modules). As in telemetry.pr.yml, it lists the test_utils modules by name, so other test_utils changes don't start the GPU pipeline. Signed-off-by: Yadan Wei <weiyadan@amazon.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add the Miles v0.2.0 AL2023 EC2 training image on its own, so the EC2 variant can be released before the SageMaker Training one. This is #7062 without the SageMaker target, as one commit on current main. #7062 stays open for the SageMaker target, and its description and commits record how the v0.2.0 image was put together.
Changes from #7062:
sagemaker-amzn2023.yml, so the pipeline builds and tests onlyec2-amzn2023.yml.sagemakerstage. Thebasestage the two targets shared stays, and theec2stage is unchanged, so the SageMaker target can be added on top later.test_sagemaker_path_exists(the/opt/mlcheck) goes, with the step that passed the build target to the unit tests.All other files match #7062, which has the same two follow-up commits on top of 18d7803 (627c038 and 8cc6700). Nothing else the image build reads has changed on main since #7062's base.
What the image contains:
8e419cc7), matched toradixark/miles:v0.2.0(amd64sha256:92b5a817…):pip freeze, plus security bumps.cu130-torch214-x86_64match its hashes.pip checkmatches upstream's, minus the lines for packages this image doesn't ship.fd01715(0.5.24.dev96), Megatron-LM809217f, torchtitan45e33cd(v0.4.0), torch_memory_saver118b09band Megatron-Bridgea0c6d6e. sglang-router is rebuilt from source at236ff11./root/miles,/root/Megatron-LM,/root/torchtitanand/sgl-workspace/sglang. Miles' Helm charts and recipes assume these paths, so they work on EKS, ECS and EC2 as they do withradixark/miles.libetcd_wrapper.sois rebuilt with go1.27.4 and patched Go modules, as the vLLM AL2023 image does (fix(vllm): rebuild Mooncake's libetcd_wrapper.so with Go 1.27.3 (clears 32 Go CVEs) #6975).rust/tree is dropped after its Rust extensions are built.OSS compliance: the OSS compliance check on this image passed and blocked nothing. eb86e08 fixes what it found that the image can fix itself:
THIRD_PARTY_SOURCE_CODE_URLSnow lists their source tarball at the installed version.sgl-model-gateway, the router binary, now has build-from-source and source URL entries, as kubectl and Helm do.te_fa4_needs_sm90.patchchanges an Apache-2.0 file, and its added comment now says Amazon modified it.Review fixes (c23a904):
EFA_VERSIONislatest, but the EFA install layer was cached until something before it changed.CACHE_REFRESHis now declared right before the install, so the layer rebuilds daily and picks up new EFA releases, as fix: rebuild the vllm (AL2023) efa layer daily so efa latest picks up new releases #7053 did for the vLLM AL2023 image. The venv and source copies before it stay cached.test/efa,test/requirements.txt, and the harness that the multi-GPU and multi-node tests import (test/__init__.py,test/conftest.pyand sixtest_utilsmodules, listed by name as intelemetry.pr.yml).Telemetry is left for the final pre-merge change, as in #7062.
Test Plan
The PR pipeline on
ec2-amzn2023.yml:Test Result
sha256:6950d452…) on a p5.48xlarge (8× H100), the way the CI jobs do. Everything passed:sgl_flash_mladense decode on SM90 and the nv_devflash_mlasparse prefill both come within about 0.002 relative error of a float32 reference;flashmlaandtritonbackends;/root/mileswith upstream'sPYTHONPATH.ec2-amzn2023.yml:pre-commit run --all-filespasses.Toggle if you are merging into main Branch
PR Checklist
pre-commit run --all-fileslocally before creating this PR. (Read DEVELOPMENT.md for details).