Skip to content

[ci] Build Python 3.14 images and wheels - #64754

Merged
elliot-barn merged 5 commits into
masterfrom
elliot-barn-py314-images
Jul 15, 2026
Merged

elliot-barn merged 5 commits into
masterfrom
elliot-barn-py314-images

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

Enables building & publishing Python 3.14 images and wheels.

Stacked on #64750 (base branch elliot-barn-py314-port-64495), which provides the py3.14 base deplocks this relies on. This PR will auto-retarget to master once #64750 merges.

Images

Adds 3.14 to the core ray / ray-extra / ray-anyscale build & publish matrices (ray-ml, ray-llm and ray-torch intentionally left as-is):

  • .buildkite/_images.rayci.yml — cpu / cpu-extra / tpu / cuda / cuda-extra + slim cpu/cuda base layers
  • .buildkite/build.rayci.yml — ray + ray-extra cpu/tpu/cuda build & publish (x86_64)
  • .buildkite/linux_aarch64.rayci.yml — base layers + ray/ray-extra build & publish (aarch64)
  • .buildkite/release/build.rayci.yml — base-extra-testdeps + ray-anyscale cpu/cuda build & publish

Also closes an existing inconsistency: ray-images.json already advertised 3.14 for the ray image, but it was never actually built or pushed.

Wheels

The rest of the wheel path was already 3.14-ready; this closes the two remaining gaps:

  • ci/build/build_wheel.py — add 3.14 to SUPPORTED_PYTHON_VERSIONS
  • python/build-wheel-manylinux2014.sh — add py314 cp314-cp314

No ray-torch changes.

Ports the py3.14-specific changes from #64495 onto current master:

- Enable the py3.14 build arg for the TPU base-deps depset in
  rayimg.depsets.yaml and generate ray_base_deps_tpu_py3.14.lock.
- Refresh the py3.14 lock files (base_deps, base_extra,
  base_extra_testdeps, base_slim, ray_img) via raydepsets.
- Bump py3.14 compiled constraints (numpy 2.3.3, urllib3 2.0.7,
  numba 0.65.0, llvmlite 0.47.0, cupy-cuda12x 14.0.1, pytest 8.3.3).

Excludes the ray-torch image changes and the cu130 py3.14 image lock
(master deliberately excludes py3.14 from the cu130 relax: cupy-cuda13x
has no cp314 wheel and no cu130 target uses py3.14).

Signed-off-by: elliot-barn <[email protected]>
Add py314_cu130 to the ray_img_cu130 relax depset and generate
ray_img_cu130_py3.14.lock. The relax simply strips cupy-cuda12x from
ray_img_py3.14.lock, so it doesn't depend on a cupy-cuda13x cp314 wheel.
Drop the now-stale "py3.10-3.13 only" comment.

Signed-off-by: elliot-barn <[email protected]>
Enable Python 3.14 across the image build/publish matrices and finish
the remaining wheel-build gaps. The py3.14 base deplocks this relies on
land in the parent branch (#64750).

Images (add 3.14 to the ray / ray-extra / ray-anyscale matrices; ray-ml,
ray-llm and ray-torch are intentionally left as-is):
- .buildkite/_images.rayci.yml: cpu/cpu-extra/tpu/cuda/cuda-extra and
  slim cpu/cuda base layers
- .buildkite/build.rayci.yml: ray + ray-extra cpu/tpu/cuda build & publish
  (x86_64)
- .buildkite/linux_aarch64.rayci.yml: base layers + ray/ray-extra build &
  publish (aarch64)
- .buildkite/release/build.rayci.yml: base-extra-testdeps and
  ray-anyscale cpu/cuda build & publish

This also closes an existing inconsistency: ray-images.json already
advertised 3.14 for the ray image, but it was never actually built or
pushed.

Wheels:
- ci/build/build_wheel.py: add 3.14 to SUPPORTED_PYTHON_VERSIONS
- python/build-wheel-manylinux2014.sh: add py314 cp314-cp314

Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn requested review from a team as code owners July 14, 2026 20:45

@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 adds support for Python 3.14 across various Buildkite CI/CD pipeline configurations and wheel building scripts, including ci/build/build_wheel.py and python/build-wheel-manylinux2014.sh. There are no review comments, and I have no feedback to provide.

@elliot-barn

Copy link
Copy Markdown
Collaborator Author

Stacked on #64750 (py3.14 base/tpu/cu130 deplocks). Merge #64750 first; this PR then retargets to master automatically.

@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Jul 15, 2026
Base automatically changed from elliot-barn-py314-port-64495 to master July 15, 2026 00:59
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core devprod labels Jul 15, 2026
The cu13 image build swaps ray[all]'s cupy-cuda12x for the matching
cupy-cuda13x build via a hard-coded pip install. cupy-cuda13x 13.6.0
ships wheels only up to cp313, so the py3.14 cu13.0.0 ray / ray-extra
image builds failed with "No matching distribution found for
cupy-cuda13x==13.6.0".

Make the pin conditional on the Python version: py3.14 installs 14.0.1
(the first cu13 build with a cp314 wheel), while py3.10-3.13 keep 13.6.0
unchanged. Re-declare the PYTHON_VERSION build arg in the build stage so
it is available inside the RUN script.

Signed-off-by: elliot-barn <[email protected]>
@elliot-barn

Copy link
Copy Markdown
Collaborator Author

Fix for the py3.14 cu13 image build failures (from premerge build 70110)

The only PR-caused failures were wanda: ray py3.14 cu13.0.0-cudnn (x86_64) and wanda: ray-extra py3.14 cu13.0.0-cudnn (x86_64). All other py3.14 images (cpu/cu11/cu12/tpu) passed.

Root cause: ci/docker/ray-image.Dockerfile's cu13 cupy swap hard-pins cupy-cuda13x==13.6.0, which only ships wheels up to cp313 (no cp314). So on py3.14 the build failed with:

ERROR: Could not find a version that satisfies the requirement cupy-cuda13x==13.6.0
       (from versions: 14.0.0, 14.0.1, 14.1.0, 14.1.1)

This is exactly the case the rayimg.depsets.yaml cu130 comment flagged ("cupy-cuda13x==13.6.0 has no cp314 wheel"). Note the pin was also stale: the cu12 path already ships cupy-cuda12x==14.0.1, while cu13 sat a full major behind.

Fix: make the cu13 cupy pin conditional on the Python version — py3.14 installs cupy-cuda13x==14.0.1 (the first cu13 build with a cp314 wheel; cp310–cp314 verified on PyPI), while py3.10–3.13 keep 13.6.0 unchanged. Re-declared the PYTHON_VERSION build arg in the build stage so it's in scope inside the RUN script (it was a global ARG only, so ${PYTHON_VERSION} would otherwise have been empty).

Verified PYTHON_VERSION is passed as a build arg by the corresponding wanda files (ray-image-cuda.wanda.yaml, ray-extra-image-cuda.wanda.yaml, and cpu/tpu/anyscale variants), and that PLATFORM=cu$CUDA_VERSION → cu13.0.0 matches the cu13* guard, so the conditional fires as intended.

Unrelated: the core: runtime env container tests (py3.10) failure in that build is a pre-existing flake (ModuleNotFoundError: No module named 'pytest' inside an exec'd container) — not caused by this PR.

AI assistance was used for this change.

@elliot-barn
elliot-barn merged commit b4dd9e4 into master Jul 15, 2026
3 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn-py314-images branch July 15, 2026 07:00
@reneleonhardt

Copy link
Copy Markdown

When will Python 3.15 work start? Planned for 2026-10-01.

400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
Enables building & publishing **Python 3.14 images and wheels**.

Stacked on ray-project#64750 (base branch `elliot-barn-py314-port-64495`), which
provides the py3.14 base deplocks this relies on. This PR will
auto-retarget to `master` once ray-project#64750 merges.

## Images
Adds `3.14` to the core `ray` / `ray-extra` / `ray-anyscale` build &
publish matrices (ray-ml, ray-llm and ray-torch intentionally left
as-is):
- `.buildkite/_images.rayci.yml` — cpu / cpu-extra / tpu / cuda /
cuda-extra + slim cpu/cuda base layers
- `.buildkite/build.rayci.yml` — ray + ray-extra cpu/tpu/cuda build &
publish (x86_64)
- `.buildkite/linux_aarch64.rayci.yml` — base layers + ray/ray-extra
build & publish (aarch64)
- `.buildkite/release/build.rayci.yml` — base-extra-testdeps +
ray-anyscale cpu/cuda build & publish

Also closes an existing inconsistency: `ray-images.json` already
advertised 3.14 for the `ray` image, but it was never actually built or
pushed.

## Wheels
The rest of the wheel path was already 3.14-ready; this closes the two
remaining gaps:
- `ci/build/build_wheel.py` — add `3.14` to `SUPPORTED_PYTHON_VERSIONS`
- `python/build-wheel-manylinux2014.sh` — add `py314 cp314-cp314`

No ray-torch changes.

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: 400Ping <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod 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