ray(serve): drive dlc_major/minor_version LABELs from config ARGs#6377
Merged
Conversation
The Ray Serve Dockerfiles hardcoded LABEL dlc_major_version / dlc_minor_version as static text, so the config's dlc_major_version / dlc_minor_version were passed as --build-arg but silently ignored (no matching ARG). Config and LABEL could drift, and only the LABEL affected the released version — editing the config did nothing. Add ARG DLC_MAJOR_VERSION / ARG DLC_MINOR_VERSION and interpolate them into the LABELs (both Dockerfile.cuda and Dockerfile.cpu), matching vllm/sglang amzn2023 and the new ray-train image. The config build: block is now the single source of truth for the DLC version.
jinyan-li1
approved these changes
Jul 10, 2026
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.
Problem
The Ray Serve Dockerfiles (
docker/ray/Dockerfile.{cuda,cpu}) hardcoded the version LABELs as static text:The image configs (
.github/config/image/ray/*.yml) setdlc_major_version/dlc_minor_versionunderbuild:, which the build-image action forwards as--build-arg. But since the Dockerfile declared no matchingARG, those build-args were silently ignored.Consequences:
0while the LABEL said2), and only the LABEL affects the released version (_resolve_release_versionin DLContainersReleaseLogicPython readsdlc_major_version/dlc_minor_versionoff the built image).dlc_minor_versiondid nothing — only bumping the hardcoded LABEL cut a new minor. Confusing and error-prone.Fix
Add
ARG DLC_MAJOR_VERSION/ARG DLC_MINOR_VERSIONand interpolate them into the LABELs, so the configbuild:block is the single source of truth:This matches the existing convention in
docker/vllm/Dockerfile.amzn2023,docker/sglang/Dockerfile.amzn2023, and the newdocker/ray-train/Dockerfile.cuda.Verification
resolve_build_args.pyonray/ec2-gpu.ymlnow forwardsDLC_MAJOR_VERSION=1andDLC_MINOR_VERSION=2, consumed by the new ARGs into the LABELs.1.2== prior hardcoded LABEL1.2) — this only removes the silent-ignore footgun. Pre-commit (dockerfmt etc.) passes.