Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 176 additions & 22 deletions .buildkite/release/build.rayci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
group: release build
steps:
# Build ray core components (required for wheel builds)
- name: ray-core-build
label: "wanda: core binary parts py{{matrix}} (x86_64)"
wanda: ci/docker/ray-core.wanda.yaml
matrix:
- "3.10"
- "3.11"
- "3.12"
env:
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"
tags: oss

- name: ray-dashboard-build
label: "wanda: dashboard"
wanda: ci/docker/ray-dashboard.wanda.yaml
env:
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"
tags: oss

- name: ray-java-build
label: "wanda: java build (x86_64)"
wanda: ci/docker/ray-java.wanda.yaml
tags: oss
env:
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"

- name: ray-wheel-build
label: "wanda: wheel py{{matrix}} (x86_64)"
wanda: ci/docker/ray-wheel.wanda.yaml
matrix:
- "3.10"
- "3.11"
- "3.12"
env:
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"
tags: oss
depends_on:
- ray-core-build
- ray-java-build
- ray-dashboard-build

- name: raycpubaseextra-testdeps
label: "wanda: ray.py{{matrix}}.cpu.base-extra-testdeps"
wanda: docker/base-extra-testdeps/cpu.wanda.yaml
Expand Down Expand Up @@ -67,62 +117,166 @@ steps:
depends_on:
- ray-mlcudabaseextra

- label: ":tapioca: build: ray py{{matrix.python}}-{{matrix.platform}} image for release tests"
# Build ray anyscale images using wanda (CPU)
- name: ray-anyscale-cpu-build
label: "wanda: ray-anyscale py{{matrix}} cpu"
wanda: ci/docker/ray-anyscale-cpu.wanda.yaml
matrix:
# This list should be kept in sync with the list of supported Python in
# release test suite
- "3.10"
- "3.11"
- "3.12"
env:
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
tags:
- oss
depends_on:
- ray-wheel-build
- raycpubaseextra-testdeps

# Build ray anyscale images using wanda (CUDA)
- name: ray-anyscale-cuda-build
label: "wanda: ray-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
wanda: ci/docker/ray-anyscale-cuda.wanda.yaml
matrix:
setup:
python:
- "3.10"
- "3.11"
- "3.12"
cuda:
- "12.3.2-cudnn9"
env:
PYTHON_VERSION: "{{matrix.python}}"
CUDA_VERSION: "{{matrix.cuda}}"
ARCH_SUFFIX: ""
tags:
- oss
depends_on:
- ray-wheel-build
- raycudabaseextra-testdeps

# Push anyscale images to ECR/GCP/Azure registries
- label: ":docker: push: ray-anyscale py{{matrix.python}} {{matrix.platform}}"
key: anyscalebuild
instance_type: release-medium
mount_buildkite_agent: true
tags:
- oss
commands:
- bazel run //ci/ray_ci:build_in_docker -- anyscale
--python-version {{matrix.python}} --platform {{matrix.platform}}
--image-type ray --upload
# Authenticate with GCP and Azure before pushing
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
- bash release/azure_docker_login.sh
- az acr login --name rayreleasetest
Comment on lines +170 to +172
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These authentication commands are duplicated across the anyscalebuild, anyscalellmbuild, and anyscalemlbuild push jobs. To improve maintainability and reduce redundancy, consider using YAML anchors and aliases to define these commands once and reuse them in each job. This will make future updates to the authentication process much easier.

# PATH must include gcloud SDK for crane to use docker credential helper
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
bazel run //ci/ray_ci/automation:push_anyscale_image --
--python-version {{matrix.python}}
--platform {{matrix.platform}}
--image-type ray
--upload
depends_on:
- manylinux-x86_64
- forge
- raycpubaseextra-testdeps
- raycudabaseextra-testdeps
- ray-anyscale-cpu-build
- ray-anyscale-cuda-build
matrix:
setup:
python:
# This list should be kept in sync with the list of supported Python in
# release test suite
- "3.10"
- "3.11"
- "3.12"
platform:
- cu12.3.2-cudnn9
- cpu

- label: ":tapioca: build: ray-llm py{{matrix}} image for release tests"
# Build ray-llm anyscale image using wanda
- name: ray-llm-anyscale-cuda-build
label: "wanda: ray-llm-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
wanda: ci/docker/ray-llm-anyscale-cuda.wanda.yaml
matrix:
setup:
python:
- "3.11"
cuda:
- "12.8.1-cudnn"
env:
PYTHON_VERSION: "{{matrix.python}}"
CUDA_VERSION: "{{matrix.cuda}}"
ARCH_SUFFIX: ""
tags:
- oss
depends_on:
- ray-wheel-build
- ray-llmbaseextra-testdeps

# Push ray-llm anyscale images to ECR/GCP/Azure registries
- label: ":docker: push: ray-llm-anyscale py{{matrix}} cu12.8.1-cudnn"
key: anyscalellmbuild
instance_type: release-medium
mount_buildkite_agent: true
tags:
- oss
commands:
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
--platform cu12.8.1-cudnn --image-type ray-llm --upload
# Authenticate with GCP and Azure before pushing
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
- bash release/azure_docker_login.sh
- az acr login --name rayreleasetest
# PATH must include gcloud SDK for crane to use docker credential helper
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
bazel run //ci/ray_ci/automation:push_anyscale_image --
--python-version {{matrix}}
--platform cu12.8.1-cudnn
--image-type ray-llm
--upload
depends_on:
- manylinux-x86_64
- forge
- ray-llmbaseextra-testdeps
- ray-llm-anyscale-cuda-build
matrix:
- "3.11"

- label: ":tapioca: build: ray-ml py{{matrix}} image for release tests"
# Build ray-ml anyscale image using wanda
- name: ray-ml-anyscale-cuda-build
label: "wanda: ray-ml-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
wanda: ci/docker/ray-ml-anyscale-cuda.wanda.yaml
matrix:
setup:
python:
# This list should be kept in sync with the list of supported Python in
# release test suite
- "3.10"
cuda:
- "12.1.1-cudnn8"
env:
PYTHON_VERSION: "{{matrix.python}}"
CUDA_VERSION: "{{matrix.cuda}}"
ARCH_SUFFIX: ""
tags:
- oss
depends_on:
- ray-wheel-build
- ray-mlcudabaseextra-testdeps

# Push ray-ml anyscale images to ECR/GCP/Azure registries
- label: ":docker: push: ray-ml-anyscale py{{matrix}} cu12.1.1-cudnn8"
key: anyscalemlbuild
instance_type: release-medium
mount_buildkite_agent: true
tags:
- oss
commands:
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
--platform cu12.1.1-cudnn8 --image-type ray-ml --upload
# Authenticate with GCP and Azure before pushing
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
- bash release/azure_docker_login.sh
- az acr login --name rayreleasetest
# PATH must include gcloud SDK for crane to use docker credential helper
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
bazel run //ci/ray_ci/automation:push_anyscale_image --
--python-version {{matrix}}
--platform cu12.1.1-cudnn8
--image-type ray-ml
--upload
depends_on:
- manylinux-x86_64
- forge
- ray-mlcudabaseextra-testdeps
- ray-ml-anyscale-cuda-build
matrix:
# This list should be kept in sync with the list of supported Python in
# release test suite
Expand Down
20 changes: 20 additions & 0 deletions ci/docker/ray-anyscale-cpu.wanda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ray Anyscale CPU Image (for release tests)
# Installs ray wheel into the CPU base-extra-testdeps image
#
# This produces the anyscale test image for CPU-only release tests.
# Unlike the regular ray image, this uses base-extra-testdeps which
# includes additional test dependencies.
#
name: "ray-anyscale-py$PYTHON_VERSION-cpu$ARCH_SUFFIX"
disable_caching: true
froms:
- "cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra-testdeps" # CPU base with test deps
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
dockerfile: ci/docker/ray-image.Dockerfile
srcs:
- python/requirements_compiled.txt
build_args:
- PYTHON_VERSION
- ARCH_SUFFIX
- BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra-testdeps
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
21 changes: 21 additions & 0 deletions ci/docker/ray-anyscale-cuda.wanda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ray Anyscale CUDA Image (for release tests)
# Installs ray wheel into the CUDA base-extra-testdeps image
#
# This produces the anyscale test image for GPU release tests.
# Unlike the regular ray image, this uses base-extra-testdeps which
# includes additional test dependencies.
#
name: "ray-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
disable_caching: true
froms:
- "cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # CUDA base with test deps
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
dockerfile: ci/docker/ray-image.Dockerfile
srcs:
- python/requirements_compiled.txt
build_args:
- PYTHON_VERSION
- CUDA_VERSION
- ARCH_SUFFIX
- BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
20 changes: 20 additions & 0 deletions ci/docker/ray-llm-anyscale-cuda.wanda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ray-LLM Anyscale CUDA Image (for release tests)
# Installs ray wheel into the ray-llm CUDA base-extra-testdeps image
#
# This produces the anyscale test image for ray-llm GPU release tests.
# Uses ray-llm base with extra test dependencies.
#
name: "ray-llm-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
disable_caching: true
froms:
- "cr.ray.io/rayproject/ray-llm-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # ray-llm base with test deps
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
dockerfile: ci/docker/ray-image.Dockerfile
srcs:
- python/requirements_compiled.txt
build_args:
- PYTHON_VERSION
- CUDA_VERSION
- ARCH_SUFFIX
- BASE_IMAGE=cr.ray.io/rayproject/ray-llm-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
20 changes: 20 additions & 0 deletions ci/docker/ray-ml-anyscale-cuda.wanda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ray-ML Anyscale CUDA Image (for release tests)
# Installs ray wheel into the ray-ml CUDA base-extra-testdeps image
#
# This produces the anyscale test image for ray-ml GPU release tests.
# Uses ray-ml base with extra test dependencies.
#
name: "ray-ml-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
disable_caching: true
froms:
- "cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # ray-ml base with test deps
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
dockerfile: ci/docker/ray-image.Dockerfile
srcs:
- python/requirements_compiled.txt
build_args:
- PYTHON_VERSION
- CUDA_VERSION
- ARCH_SUFFIX
- BASE_IMAGE=cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
27 changes: 27 additions & 0 deletions ci/ray_ci/automation/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,30 @@ py_test(
ci_require("pytest"),
],
)

py_binary(
name = "push_anyscale_image",
srcs = ["push_anyscale_image.py"],
exec_compatible_with = ["//bazel:py3"],
deps = [
":crane_lib",
"//ci/ray_ci:ray_ci_lib",
"//release:ray_release",
ci_require("click"),
],
)

py_test(
name = "test_push_anyscale_image",
size = "small",
srcs = ["test_push_anyscale_image.py"],
exec_compatible_with = ["//bazel:py3"],
tags = [
"ci_unit",
"team:ci",
],
deps = [
":push_anyscale_image",
ci_require("pytest"),
],
)
Loading