Skip to content

[build] feat: add top-level build-image.sh#61042

Merged
aslonnie merged 3 commits into
masterfrom
andrew/revup/master/build-image-sh
Mar 4, 2026
Merged

[build] feat: add top-level build-image.sh#61042
aslonnie merged 3 commits into
masterfrom
andrew/revup/master/build-image-sh

Conversation

@andrew-anyscale

@andrew-anyscale andrew-anyscale commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Adds build-image.sh, entrypoint for building Ray images locally.

❯  ./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

@andrew-anyscale

andrew-anyscale commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author

Reviews in this chain:
#61338 [ci] add CLI for local Docker image builder (build_image.py)
 └#61042 [build] feat: add top-level build-image.sh

@andrew-anyscale

andrew-anyscale commented Feb 13, 2026

Copy link
Copy Markdown
Contributor Author
# head base diff date summary
0 78af93d1 af948aac diff Feb 12 18:26 PM 1 file changed, 28 insertions(+)
1 dd391924 369ceb69 rebase Feb 13 11:34 AM 0 files changed
2 654ad5bc c732c6c1 rebase Feb 13 11:35 AM 0 files changed
3 656997b4 00f683a0 rebase Feb 13 11:36 AM 0 files changed
4 d5338be0 639a0354 rebase Feb 13 11:58 AM 0 files changed
5 98808c63 e1093f07 diff Feb 17 15:13 PM 1 file changed, 3 insertions(+), 3 deletions(-)
6 b8323392 11dca07a diff Feb 18 9:04 AM 1 file changed, 1 insertion(+), 1 deletion(-)
7 c81ba372 aa57c37c diff Feb 18 9:05 AM 0 files changed
8 b00fb207 23824cb8 diff Feb 18 9:25 AM 1 file changed, 1 insertion(+), 1 deletion(-)
9 9681dbfd eda90adc rebase Feb 19 7:37 AM 0 files changed
10 d6c689c7 18283d29 diff Feb 24 7:25 AM 1 file changed, 11 insertions(+)
11 a8904388 4229c6c2 rebase Feb 24 9:06 AM 0 files changed
12 4a50e20e fef92536 diff Feb 24 9:07 AM 0 files changed
13 8bd386ca cc29feda rebase Feb 24 12:43 PM 0 files changed
14 e634369d ad75665d rebase Feb 24 12:47 PM 0 files changed
15 6a7c9fab 9a92fb73 rebase Feb 25 16:34 PM 0 files changed
16 ae506eab 084fdf79 diff Feb 25 17:43 PM 0 files changed
17 2cb49e35 18f04826 diff Feb 25 17:45 PM 0 files changed
18 b59359f3 acfab2c7 diff Feb 25 18:57 PM 2 files changed, 34 insertions(+), 36 deletions(-)
19 8681278d f77f128e rebase Feb 25 19:36 PM 0 files changed
20 77d9fac3 5a12479d rebase Feb 25 20:36 PM 0 files changed
21 a70f3748 6e77ce0b rebase Feb 25 20:38 PM 0 files changed
22 dae1c0eb a630159e rebase Feb 25 20:42 PM 0 files changed
23 4267c9bd 50c2f56c rebase Feb 25 20:53 PM 0 files changed
24 e617f2b4 a6b29544 rebase Feb 25 20:56 PM 0 files changed
25 de28c757 9e8f8390 rebase Feb 26 6:40 AM 0 files changed
26 1e3119b4 73c7c3b0 rebase Feb 26 7:27 AM 0 files changed
27 0144e429 77f9a737 rebase Feb 26 8:15 AM 0 files changed
28 ca1bb6fb d73eac18 rebase Feb 26 8:20 AM 0 files changed
29 b6379600 c83d79c3 rebase Feb 26 10:48 AM 0 files changed
30 caa7ce5a dcbda350 rebase Mar 2 7:17 AM 0 files changed
31 f450a572 0254cb88 rebase Mar 3 7:29 AM 0 files changed
32 3e944155 ca00c9a7 rebase Mar 3 7:33 AM 0 files changed
33 19ec5b80 adbbf88b rebase Mar 3 7:37 AM 0 files changed
34 6276d082 f0a7c306 rebase Mar 3 7:40 AM 0 files changed
35 df691168 cc0b1022 rebase Mar 3 11:46 AM 0 files changed
36 aa5ed70d ba0be702 rebase Mar 3 12:01 PM 0 files changed
37 3506381e d8861c5d rebase Mar 3 16:52 PM 0 files changed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-image.sh
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from 78af93d to dd39192 Compare February 13, 2026 19:34
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch 2 times, most recently from 369ceb6 to c732c6c Compare February 13, 2026 19:35
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from 654ad5b to 656997b Compare February 13, 2026 19:36
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch 2 times, most recently from 00f683a to 639a035 Compare February 13, 2026 19:58
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from d5338be to 98808c6 Compare February 17, 2026 23:13
@andrew-anyscale andrew-anyscale marked this pull request as ready for review February 17, 2026 23:13
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch from 639a035 to e1093f0 Compare February 17, 2026 23:13
@ray-gardener ray-gardener Bot added the community-contribution Contributed by the community label Feb 18, 2026
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from 98808c6 to b832339 Compare February 18, 2026 17:04
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch from e1093f0 to 11dca07 Compare February 18, 2026 17:04
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from b832339 to c81ba37 Compare February 18, 2026 17:05
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch from 11dca07 to aa57c37 Compare February 18, 2026 17:05
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from b00fb20 to 9681dbf Compare February 19, 2026 15:37
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-local branch from f91888e to eda90ad Compare February 19, 2026 15:37
Comment thread build-image.sh
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" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@aslonnie aslonnie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from 9681dbf to d6c689c Compare February 24, 2026 15:25
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch from f77f128 to 5a12479 Compare February 26, 2026 04:36
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from 8681278 to 77d9fac Compare February 26, 2026 04:36
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch from 5a12479 to 6e77ce0 Compare February 26, 2026 04:38
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from a70f374 to dae1c0e Compare February 26, 2026 04:42
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch 2 times, most recently from a630159 to 50c2f56 Compare February 26, 2026 04:54
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from 4267c9b to e617f2b Compare February 26, 2026 04:56
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch from 50c2f56 to a6b2954 Compare February 26, 2026 04:56
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from e617f2b to de28c75 Compare February 26, 2026 14:40
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch 2 times, most recently from 9e8f839 to 73c7c3b Compare February 26, 2026 15:27
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from de28c75 to 1e3119b Compare February 26, 2026 15:27
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch from 73c7c3b to 77f9a73 Compare February 26, 2026 16:15
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from 0144e42 to ca1bb6f Compare February 26, 2026 16:20
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch 2 times, most recently from d73eac1 to c83d79c Compare February 26, 2026 18:48
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch from ca1bb6f to b637960 Compare February 26, 2026 18:48
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-cli branch from c83d79c to dcbda35 Compare March 2, 2026 15:17
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/build-image-sh branch 2 times, most recently from caa7ce5 to f450a57 Compare March 3, 2026 15:29
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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread build-image.sh

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" "$@"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build community-contribution Contributed by the community go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants