[build] feat: add top-level build-image.sh#61042
Conversation
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new top-level script, build-image.sh, to simplify building Ray Docker images locally. The script is a well-implemented wrapper that uses uv to delegate to an existing Python build script. My review includes one suggestion to improve the robustness of the platform detection logic in the new shell script.
78af93d to
dd39192
Compare
369ceb6 to
c732c6c
Compare
654ad5b to
656997b
Compare
00f683a to
639a035
Compare
d5338be to
98808c6
Compare
639a035 to
e1093f0
Compare
98808c6 to
b832339
Compare
e1093f0 to
11dca07
Compare
b832339 to
c81ba37
Compare
11dca07 to
aa57c37
Compare
b00fb20 to
9681dbf
Compare
f91888e to
eda90ad
Compare
| case "$(uname -s)-$(uname -m)" in | ||
| Darwin-arm64) WHEEL_PLATFORM="macosx_12_0_arm64" ;; | ||
| Linux-x86_64 | Linux-amd64) WHEEL_PLATFORM="manylinux2014_x86_64" ;; | ||
| Linux-aarch64 | Linux-arm64) WHEEL_PLATFORM="manylinux2014_aarch64" ;; |
There was a problem hiding this comment.
Dead case branches will never match on Linux
Low Severity
The Linux-amd64 and Linux-arm64 alternatives in the case statement are dead code. On Linux, uname -m returns x86_64 and aarch64, never amd64 or arm64 (those are Debian/macOS naming conventions, not kernel-reported machine names). The sibling script build-wheel.sh correctly uses only Linux-x86_64 and Linux-aarch64 without these extra alternatives. Including them here is misleading — it suggests they're reachable and diverges from the established pattern.
aslonnie
left a comment
There was a problem hiding this comment.
I really love the interface. it shows that it is built with love.
we need to talk a bit more about the packaging and launching though.
9681dbf to
d6c689c
Compare
f77f128 to
5a12479
Compare
8681278 to
77d9fac
Compare
5a12479 to
6e77ce0
Compare
a70f374 to
dae1c0e
Compare
a630159 to
50c2f56
Compare
4267c9b to
e617f2b
Compare
50c2f56 to
a6b2954
Compare
e617f2b to
de28c75
Compare
9e8f839 to
73c7c3b
Compare
de28c75 to
1e3119b
Compare
73c7c3b to
77f9a73
Compare
0144e42 to
ca1bb6f
Compare
d73eac1 to
c83d79c
Compare
ca1bb6f to
b637960
Compare
c83d79c to
dcbda35
Compare
caa7ce5 to
f450a57
Compare
Add argparse CLI with image type/platform tables, nightly alias quick-reference, and example commands. Supports --list-platforms and sensible defaults per image type. Topic: build-image-cli Relative: build-image-builder Signed-off-by: andrew <andrew@anyscale.com>
Adds build-image.sh, entrypoint for building Ray images locally.
```bash
❯ ./build-image.sh
usage: ./build-image.sh [-h] [-p VERSION] [--platform PLATFORM] [--list-platforms] IMAGE_TYPE
Build Ray Docker images locally using Wanda.
positional arguments:
IMAGE_TYPE Image type: ray, ray-extra, ray-llm, ray-llm-extra
options:
-h, --help show this help message and exit
-p, --python-version VERSION
Python version (default depends on image type; see table below)
--platform PLATFORM Target platform (default depends on image type; see table below)
--list-platforms List valid platforms for the given image type and exit
Supported image types:
IMAGE TYPE PYTHON VERSIONS (-p) PLATFORMS (--platform)
------------- -------------------------------- ------------------------------------------------
ray 3.10 (default), 3.11, 3.12, 3.13 cpu (default), cu11.7.1-cudnn8, cu11.8.0-cudnn8
cu12.1.1-cudnn8, cu12.3.2-cudnn9, c2.4.1-cudnn
cu12.5.1-cudnn, cu12.6.3-cudnn, cu12.8.1-cudnn
cu12.9.1-cudnn
ray-extra 3.10 (default), 3.11, 3.12, 3.13 cpu (default), cu11.7.1-cudnn8, cu11.8.0-cudnn8
cu12.1.1-cudnn8, cu12.3.2-cudnn9, cu12.4.1-cudnn
cu12.5.1-cudnn, cu12.6.3-cudnn, cu12.8.1-cudnn
cu12.9.1-cudnn
ray-llm 3.11 (default) cu12.8.1-cudnn (default)
ray-llm-extra 3.11 (default) cu12.8.1-cudnn (default)
Nightly images (built with defaults):
BUILD RUN
------------------------------ ---------------------------------------------------------
./build-image.sh ray docker run -it cr.ray.io/rayproject/ray:nightly
./build-image.sh ray-extra docker run -it cr.ray.io/rayproject/ray:nightly-extra
./build-image.sh ray-llm docker run -it cr.ray.io/rayproject/ray-llm:nightly
./build-image.sh ray-llm-extra docker run -it cr.ray.io/rayproject/ray-llm:nightly-extra
Examples:
./build-image.sh ray -p 3.11 # ray cpu py3.11
./build-image.sh ray --platform cu11.7.1-cudnn8 # ray cu11.7.1-cudnn8 py3.10
./build-image.sh ray -p 3.11 --platform cu11.7.1-cudnn8 # ray cu11.7.1-cudnn8 py3.11
```
Topic: build-image-sh
Relative: build-image-cli
Signed-off-by: andrew <andrew@anyscale.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
|
|
||
| RAYMAKE_URL="https://github.com/ray-project/rayci/releases/download/v${RAYCI_VERSION}/raymake-${RAYCI_VERSION}-py3-none-${WHEEL_PLATFORM}.whl" | ||
|
|
||
| PYTHONPATH="$RAY_ROOT${PYTHONPATH:+:$PYTHONPATH}" exec uv run --with "$RAYMAKE_URL" "$RAY_ROOT/ci/build/build_image.py" "$@" |
There was a problem hiding this comment.
Missing CI test rules entry for new script
Low Severity
The new build-image.sh file is not registered in .buildkite/test.rules.txt, unlike its sibling scripts build-wheel.sh (tagged @ tools) and build-docker.sh (tagged @ docker linux_wheels tools). Without a test rules entry, future PRs that only modify build-image.sh won't trigger any CI test groups, so the smoke test added in build.rayci.yml may be silently skipped.


Adds build-image.sh, entrypoint for building Ray images locally.
Topic: build-image-sh
Relative: build-image-cli
Signed-off-by: andrew andrew@anyscale.com