Skip to content

Commit a26a857

Browse files
Add wanda anyscale image builds for release tests
This adds wanda-based builds for anyscale images used in release tests. Changes: - Add ray-anyscale-cpu/cuda.wanda.yaml for ray anyscale images - Add ray-llm-anyscale-cuda.wanda.yaml for LLM images - Add ray-ml-anyscale-cuda.wanda.yaml for ML images - Add push_anyscale_image.py for pushing to ECR/GCP/Azure via crane - Update release/build.rayci.yml with build and push steps - Update gcloud_docker_login.sh to v550.0.0 with arch detection Topic: anyscale-image Relative: wanda-image-upload Labels: draft Signed-off-by: andrew <andrew@anyscale.com>
1 parent 6cfc4e7 commit a26a857

File tree

8 files changed

+747
-22
lines changed

8 files changed

+747
-22
lines changed

.buildkite/release/build.rayci.yml

Lines changed: 181 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
group: release build
22
steps:
3+
# Build ray core components (required for wheel builds)
4+
- name: ray-core-build
5+
label: "wanda: core binary parts py{{matrix}} (x86_64)"
6+
wanda: ci/docker/ray-core.wanda.yaml
7+
matrix:
8+
- "3.10"
9+
- "3.11"
10+
- "3.12"
11+
env:
12+
PYTHON_VERSION: "{{matrix}}"
13+
ARCH_SUFFIX: ""
14+
HOSTTYPE: "x86_64"
15+
MANYLINUX_VERSION: "260103.868e54c"
16+
tags: oss
17+
18+
- name: ray-dashboard-build
19+
label: "wanda: dashboard"
20+
wanda: ci/docker/ray-dashboard.wanda.yaml
21+
env:
22+
ARCH_SUFFIX: ""
23+
HOSTTYPE: "x86_64"
24+
MANYLINUX_VERSION: "260103.868e54c"
25+
tags: oss
26+
27+
- name: ray-java-build
28+
label: "wanda: java build (x86_64)"
29+
wanda: ci/docker/ray-java.wanda.yaml
30+
tags: oss
31+
env:
32+
ARCH_SUFFIX: ""
33+
HOSTTYPE: "x86_64"
34+
MANYLINUX_VERSION: "260103.868e54c"
35+
36+
- name: ray-wheel-build
37+
label: "wanda: wheel py{{matrix}} (x86_64)"
38+
wanda: ci/docker/ray-wheel.wanda.yaml
39+
matrix:
40+
- "3.10"
41+
- "3.11"
42+
- "3.12"
43+
env:
44+
PYTHON_VERSION: "{{matrix}}"
45+
ARCH_SUFFIX: ""
46+
HOSTTYPE: "x86_64"
47+
MANYLINUX_VERSION: "260103.868e54c"
48+
tags: oss
49+
depends_on:
50+
- ray-core-build
51+
- ray-java-build
52+
- ray-dashboard-build
53+
354
- name: raycpubaseextra-testdeps
455
label: "wanda: ray.py{{matrix}}.cpu.base-extra-testdeps"
556
wanda: docker/base-extra-testdeps/cpu.wanda.yaml
@@ -65,26 +116,74 @@ steps:
65116
depends_on:
66117
- ray-mlcudabaseextra
67118

68-
- label: ":tapioca: build: ray py{{matrix.python}}-{{matrix.platform}} image for release tests"
119+
# Build ray anyscale images using wanda (CPU)
120+
- name: ray-anyscale-cpu-build
121+
label: "wanda: ray-anyscale py{{matrix}} cpu"
122+
wanda: ci/docker/ray-anyscale-cpu.wanda.yaml
123+
matrix:
124+
# This list should be kept in sync with the list of supported Python in
125+
# release test suite
126+
- "3.10"
127+
- "3.11"
128+
- "3.12"
129+
env:
130+
PYTHON_VERSION: "{{matrix}}"
131+
ARCH_SUFFIX: ""
132+
RAY_VERSION: "3.0.0.dev0"
133+
tags:
134+
- oss
135+
depends_on:
136+
- ray-wheel-build
137+
- raycpubaseextra-testdeps
138+
139+
# Build ray anyscale images using wanda (CUDA)
140+
- name: ray-anyscale-cuda-build
141+
label: "wanda: ray-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
142+
wanda: ci/docker/ray-anyscale-cuda.wanda.yaml
143+
matrix:
144+
setup:
145+
python:
146+
- "3.10"
147+
- "3.11"
148+
- "3.12"
149+
cuda:
150+
- "12.3.2-cudnn9"
151+
env:
152+
PYTHON_VERSION: "{{matrix.python}}"
153+
CUDA_VERSION: "{{matrix.cuda}}"
154+
ARCH_SUFFIX: ""
155+
RAY_VERSION: "3.0.0.dev0"
156+
tags:
157+
- oss
158+
depends_on:
159+
- ray-wheel-build
160+
- raycudabaseextra-testdeps
161+
162+
# Push anyscale images to ECR/GCP/Azure registries
163+
- label: ":docker: push: ray-anyscale py{{matrix.python}} {{matrix.platform}}"
69164
key: anyscalebuild
70165
instance_type: release-medium
71166
mount_buildkite_agent: true
72167
tags:
73168
- oss
74169
commands:
75-
- bazel run //ci/ray_ci:build_in_docker -- anyscale
76-
--python-version {{matrix.python}} --platform {{matrix.platform}}
77-
--image-type ray --upload
170+
# Authenticate with GCP and Azure before pushing
171+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
172+
- bash release/azure_docker_login.sh
173+
- az acr login --name rayreleasetest
174+
# PATH must include gcloud SDK for crane to use docker credential helper
175+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
176+
bazel run //ci/ray_ci/automation:push_anyscale_image --
177+
--python-version {{matrix.python}}
178+
--platform {{matrix.platform}}
179+
--image-type ray
180+
--upload
78181
depends_on:
79-
- manylinux-x86_64
80-
- forge
81-
- raycpubaseextra-testdeps
82-
- raycudabaseextra-testdeps
182+
- ray-anyscale-cpu-build
183+
- ray-anyscale-cuda-build
83184
matrix:
84185
setup:
85186
python:
86-
# This list should be kept in sync with the list of supported Python in
87-
# release test suite
88187
- "3.10"
89188
- "3.11"
90189
- "3.12"
@@ -93,35 +192,95 @@ steps:
93192
- cu12.3.2-cudnn9
94193
- cpu
95194

96-
- label: ":tapioca: build: ray-llm py{{matrix}} image for release tests"
195+
# Build ray-llm anyscale image using wanda
196+
- name: ray-llm-anyscale-cuda-build
197+
label: "wanda: ray-llm-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
198+
wanda: ci/docker/ray-llm-anyscale-cuda.wanda.yaml
199+
matrix:
200+
setup:
201+
python:
202+
- "3.11"
203+
cuda:
204+
- "12.8.1-cudnn"
205+
env:
206+
PYTHON_VERSION: "{{matrix.python}}"
207+
CUDA_VERSION: "{{matrix.cuda}}"
208+
ARCH_SUFFIX: ""
209+
RAY_VERSION: "3.0.0.dev0"
210+
tags:
211+
- oss
212+
depends_on:
213+
- ray-wheel-build
214+
- ray-llmbaseextra-testdeps
215+
216+
# Push ray-llm anyscale images to ECR/GCP/Azure registries
217+
- label: ":docker: push: ray-llm-anyscale py{{matrix}} cu12.8.1-cudnn"
97218
key: anyscalellmbuild
98219
instance_type: release-medium
99220
mount_buildkite_agent: true
100221
tags:
101222
- oss
102223
commands:
103-
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
104-
--platform cu12.8.1-cudnn --image-type ray-llm --upload
224+
# Authenticate with GCP and Azure before pushing
225+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
226+
- bash release/azure_docker_login.sh
227+
- az acr login --name rayreleasetest
228+
# PATH must include gcloud SDK for crane to use docker credential helper
229+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
230+
bazel run //ci/ray_ci/automation:push_anyscale_image --
231+
--python-version {{matrix}}
232+
--platform cu12.8.1-cudnn
233+
--image-type ray-llm
234+
--upload
105235
depends_on:
106-
- manylinux-x86_64
107-
- forge
108-
- ray-llmbaseextra-testdeps
236+
- ray-llm-anyscale-cuda-build
109237
matrix:
110238
- "3.11"
111239

112-
- label: ":tapioca: build: ray-ml py{{matrix}} image for release tests"
240+
# Build ray-ml anyscale image using wanda
241+
- name: ray-ml-anyscale-cuda-build
242+
label: "wanda: ray-ml-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
243+
wanda: ci/docker/ray-ml-anyscale-cuda.wanda.yaml
244+
matrix:
245+
setup:
246+
python:
247+
# This list should be kept in sync with the list of supported Python in
248+
# release test suite
249+
- "3.10"
250+
cuda:
251+
- "12.1.1-cudnn8"
252+
env:
253+
PYTHON_VERSION: "{{matrix.python}}"
254+
CUDA_VERSION: "{{matrix.cuda}}"
255+
ARCH_SUFFIX: ""
256+
RAY_VERSION: "3.0.0.dev0"
257+
tags:
258+
- oss
259+
depends_on:
260+
- ray-wheel-build
261+
- ray-mlcudabaseextra-testdeps
262+
263+
# Push ray-ml anyscale images to ECR/GCP/Azure registries
264+
- label: ":docker: push: ray-ml-anyscale py{{matrix}} cu12.1.1-cudnn8"
113265
key: anyscalemlbuild
114266
instance_type: release-medium
115267
mount_buildkite_agent: true
116268
tags:
117269
- oss
118270
commands:
119-
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
120-
--platform cu12.1.1-cudnn8 --image-type ray-ml --upload
271+
# Authenticate with GCP and Azure before pushing
272+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
273+
- bash release/azure_docker_login.sh
274+
- az acr login --name rayreleasetest
275+
# PATH must include gcloud SDK for crane to use docker credential helper
276+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
277+
bazel run //ci/ray_ci/automation:push_anyscale_image --
278+
--python-version {{matrix}}
279+
--platform cu12.1.1-cudnn8
280+
--image-type ray-ml
281+
--upload
121282
depends_on:
122-
- manylinux-x86_64
123-
- forge
124-
- ray-mlcudabaseextra-testdeps
283+
- ray-ml-anyscale-cuda-build
125284
matrix:
126285
# This list should be kept in sync with the list of supported Python in
127286
# release test suite
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ray Anyscale CPU Image (for release tests)
2+
# Installs ray wheel into the CPU base-extra-testdeps image
3+
#
4+
# This produces the anyscale test image for CPU-only release tests.
5+
# Unlike the regular ray image, this uses base-extra-testdeps which
6+
# includes additional test dependencies.
7+
#
8+
name: "ray-anyscale-py$PYTHON_VERSION-cpu$ARCH_SUFFIX"
9+
disable_caching: true
10+
froms:
11+
- "cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra-testdeps" # CPU base with test deps
12+
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
13+
dockerfile: ci/docker/ray-image.Dockerfile
14+
build_args:
15+
- PYTHON_VERSION
16+
- ARCH_SUFFIX
17+
- IMAGE_TYPE=ray
18+
- PLATFORM=cpu
19+
- BASE_VARIANT=base-extra-testdeps
20+
- RAY_COMMIT=$BUILDKITE_COMMIT
21+
- RAY_VERSION
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ray Anyscale CUDA Image (for release tests)
2+
# Installs ray wheel into the CUDA base-extra-testdeps image
3+
#
4+
# This produces the anyscale test image for GPU release tests.
5+
# Unlike the regular ray image, this uses base-extra-testdeps which
6+
# includes additional test dependencies.
7+
#
8+
name: "ray-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
9+
disable_caching: true
10+
froms:
11+
- "cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # CUDA base with test deps
12+
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
13+
dockerfile: ci/docker/ray-image.Dockerfile
14+
build_args:
15+
- PYTHON_VERSION
16+
- ARCH_SUFFIX
17+
- IMAGE_TYPE=ray
18+
- BASE_VARIANT=base-extra-testdeps
19+
- PLATFORM=cu$CUDA_VERSION
20+
- RAY_COMMIT=$BUILDKITE_COMMIT
21+
- RAY_VERSION
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ray-LLM Anyscale CUDA Image (for release tests)
2+
# Installs ray wheel into the ray-llm CUDA base-extra-testdeps image
3+
#
4+
# This produces the anyscale test image for ray-llm GPU release tests.
5+
# Uses ray-llm base with extra test dependencies.
6+
#
7+
name: "ray-llm-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
8+
disable_caching: true
9+
froms:
10+
- "cr.ray.io/rayproject/ray-llm-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # ray-llm base with test deps
11+
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
12+
dockerfile: ci/docker/ray-image.Dockerfile
13+
build_args:
14+
- PYTHON_VERSION
15+
- ARCH_SUFFIX
16+
- BASE_VARIANT=base-extra-testdeps
17+
- IMAGE_TYPE=ray-llm
18+
- PLATFORM=cu$CUDA_VERSION
19+
- RAY_COMMIT=$BUILDKITE_COMMIT
20+
- RAY_VERSION
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ray-ML Anyscale CUDA Image (for release tests)
2+
# Installs ray wheel into the ray-ml CUDA base-extra-testdeps image
3+
#
4+
# This produces the anyscale test image for ray-ml GPU release tests.
5+
# Uses ray-ml base with extra test dependencies.
6+
#
7+
name: "ray-ml-anyscale-py$PYTHON_VERSION-cu$CUDA_VERSION$ARCH_SUFFIX"
8+
disable_caching: true
9+
froms:
10+
- "cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps" # ray-ml base with test deps
11+
- "cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX" # Ray wheel
12+
dockerfile: ci/docker/ray-image.Dockerfile
13+
build_args:
14+
- PYTHON_VERSION
15+
- ARCH_SUFFIX
16+
- BASE_VARIANT=base-extra-testdeps
17+
- IMAGE_TYPE=ray-ml
18+
- PLATFORM=cu$CUDA_VERSION
19+
- RAY_COMMIT=$BUILDKITE_COMMIT
20+
- RAY_VERSION

ci/ray_ci/automation/BUILD.bazel

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,30 @@ py_test(
342342
ci_require("pytest"),
343343
],
344344
)
345+
346+
py_binary(
347+
name = "push_anyscale_image",
348+
srcs = ["push_anyscale_image.py"],
349+
exec_compatible_with = ["//bazel:py3"],
350+
deps = [
351+
":crane_lib",
352+
"//ci/ray_ci:ray_ci_lib",
353+
"//release:ray_release",
354+
ci_require("click"),
355+
],
356+
)
357+
358+
py_test(
359+
name = "test_push_anyscale_image",
360+
size = "small",
361+
srcs = ["test_push_anyscale_image.py"],
362+
exec_compatible_with = ["//bazel:py3"],
363+
tags = [
364+
"ci_unit",
365+
"team:ci",
366+
],
367+
deps = [
368+
":push_anyscale_image",
369+
ci_require("pytest"),
370+
],
371+
)

0 commit comments

Comments
 (0)