[ci] add RayImage model and image type config (build_image.py)#61336
[ci] add RayImage model and image type config (build_image.py)#61336
Conversation
|
Reviews in this chain: |
|
d4af784 to
bdf5009
Compare
4cdd0e0 to
242338e
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a core data model for local Docker image building, including the RayImage dataclass and configuration loading from ray-images.yaml. The changes are well-structured and include corresponding tests.
My review includes two main suggestions for ci/build/build_image.py:
- Improve the robustness of file path resolution by using the existing
find_ray_root()utility. - Enhance the design by encapsulating the logic for mapping an image platform to a Wanda spec file, which will make the module more self-contained and easier to use.
Overall, this is a good addition that sets a solid foundation for image building logic.
|
|
||
| def _load_ray_images_yaml() -> dict: | ||
| """Load ray-images.yaml from the repository root (relative to this file).""" | ||
| path = Path(__file__).resolve().parent.parent.parent / "ray-images.yaml" |
There was a problem hiding this comment.
Instead of hardcoding the relative path to the repository root (../../..), please use the find_ray_root() function from build_common. This makes path resolution more robust against file moves.
You'll also need to update the import on line 16 to include find_ray_root:
from ci.build.build_common import BuildError, find_ray_root
| path = Path(__file__).resolve().parent.parent.parent / "ray-images.yaml" | |
| path = find_ray_root() / "ray-images.yaml" |
19bae4f to
868d99d
Compare
242338e to
8023fc7
Compare
868d99d to
e0dc1b6
Compare
8023fc7 to
392777e
Compare
e0dc1b6 to
b014c7e
Compare
688d850 to
fd1bdfb
Compare
b014c7e to
d11c348
Compare
Add ray-images.yaml as a single source of truth for supported Ray Docker image configurations (ray, ray-ml, ray-llm). Each image type declares its defaults, supported python versions, platforms, and architectures. Add a loader module (ci/ray_ci/supported_images.py) and a Bazel test (test_supported_images) that validates the YAML schema is well-formed and internally consistent. Topic: ray-images-schema Signed-off-by: andrew <andrew@anyscale.com>
Replace hardcoded Python/CUDA/architecture constants in ci/ray_ci/docker_container.py with values loaded from ray-images.yaml Topic: ray-images-use Relative: ray-images-schema Signed-off-by: andrew <andrew@anyscale.com>
Add core data model for local Docker image building: RayImage dataclass, IMAGE_TYPE_CONFIG loaded from ray-images.yaml, wanda spec path mapping, and validation logic. Topic: build-image-model Relative: ray-images-use Signed-off-by: andrew <andrew@anyscale.com>
d11c348 to
ef50e0f
Compare
fd1bdfb to
92554d1
Compare
ef50e0f to
dc1385e
Compare
Add core data model for local Docker image building: RayImage dataclass, IMAGE_TYPE_CONFIG loaded from ray-images.yaml, wanda spec path mapping, and validation logic. Signed-off-by: andrew <andrew@anyscale.com> Co-authored-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com> Signed-off-by: Kamil Kaczmarek <kamil@anyscale.com>
Add core data model for local Docker image building: RayImage dataclass, IMAGE_TYPE_CONFIG loaded from ray-images.yaml, wanda spec path mapping, and validation logic.
Topic: build-image-model
Relative: ray-images-use
Signed-off-by: andrew andrew@anyscale.com