Skip to content

Commit 8eb71d4

Browse files
[ci] 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 Topic: anyscale-image Relative: wanda-image-upload Signed-off-by: andrew <andrew@anyscale.com>
1 parent fc730b0 commit 8eb71d4

File tree

8 files changed

+748
-25
lines changed

8 files changed

+748
-25
lines changed

.buildkite/release/build.rayci.yml

Lines changed: 182 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
group: release build
22
steps:
3+
- name: ray-core-build
4+
label: "wanda: core binary parts py{{matrix}} (x86_64)"
5+
wanda: ci/docker/ray-core.wanda.yaml
6+
matrix:
7+
- "3.10"
8+
- "3.11"
9+
- "3.12"
10+
env_file: rayci.env
11+
env:
12+
PYTHON_VERSION: "{{matrix}}"
13+
ARCH_SUFFIX: ""
14+
HOSTTYPE: "x86_64"
15+
tags: oss
16+
17+
- name: ray-dashboard-build
18+
label: "wanda: dashboard"
19+
wanda: ci/docker/ray-dashboard.wanda.yaml
20+
env_file: rayci.env
21+
env:
22+
ARCH_SUFFIX: ""
23+
HOSTTYPE: "x86_64"
24+
tags: oss
25+
26+
- name: ray-java-build
27+
label: "wanda: java build (x86_64)"
28+
wanda: ci/docker/ray-java.wanda.yaml
29+
tags: oss
30+
env_file: rayci.env
31+
env:
32+
ARCH_SUFFIX: ""
33+
HOSTTYPE: "x86_64"
34+
35+
- name: ray-wheel-build
36+
label: "wanda: wheel py{{matrix}} (x86_64)"
37+
wanda: ci/docker/ray-wheel.wanda.yaml
38+
matrix:
39+
- "3.10"
40+
- "3.11"
41+
- "3.12"
42+
env_file: rayci.env
43+
env:
44+
PYTHON_VERSION: "{{matrix}}"
45+
ARCH_SUFFIX: ""
46+
HOSTTYPE: "x86_64"
47+
tags: oss
48+
depends_on:
49+
- ray-core-build
50+
- ray-java-build
51+
- ray-dashboard-build
52+
353
- name: raycpubaseextra-testdeps
454
label: "wanda: ray.py{{matrix}}.cpu.base-extra-testdeps"
555
wanda: docker/base-extra-testdeps/cpu.wanda.yaml
@@ -65,26 +115,75 @@ steps:
65115
depends_on:
66116
- ray-mlcudabaseextra
67117

68-
- label: ":tapioca: build: ray py{{matrix.python}}-{{matrix.platform}} image for release tests"
118+
- name: ray-anyscale-cpu-build
119+
label: "wanda: ray-anyscale py{{matrix}} cpu"
120+
wanda: ci/docker/ray-anyscale-cpu.wanda.yaml
121+
env_file: rayci.env
122+
matrix:
123+
# This list should be kept in sync with the list of supported Python in
124+
# release test suite
125+
- "3.10"
126+
- "3.11"
127+
- "3.12"
128+
- "3.13"
129+
env:
130+
PYTHON_VERSION: "{{matrix}}"
131+
ARCH_SUFFIX: ""
132+
tags:
133+
- oss
134+
depends_on:
135+
- ray-wheel-build
136+
- raycpubaseextra-testdeps
137+
138+
- name: ray-anyscale-cuda-build
139+
label: "wanda: ray-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
140+
wanda: ci/docker/ray-anyscale-cuda.wanda.yaml
141+
env_file: rayci.env
142+
matrix:
143+
setup:
144+
python:
145+
# This list should be kept in sync with the list of supported Python in
146+
# release test suite
147+
- "3.10"
148+
- "3.11"
149+
- "3.12"
150+
- "3.13"
151+
cuda:
152+
- "12.3.2-cudnn9"
153+
env:
154+
PYTHON_VERSION: "{{matrix.python}}"
155+
CUDA_VERSION: "{{matrix.cuda}}"
156+
ARCH_SUFFIX: ""
157+
tags:
158+
- oss
159+
depends_on:
160+
- ray-wheel-build
161+
- raycudabaseextra-testdeps
162+
163+
- label: ":crane: publish: 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,36 +192,94 @@ steps:
93192
- cu12.3.2-cudnn9
94193
- cpu
95194

96-
- label: ":tapioca: build: ray-llm py{{matrix}} image for release tests"
195+
- name: ray-llm-anyscale-cuda-build
196+
label: "wanda: ray-llm-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
197+
wanda: ci/docker/ray-llm-anyscale-cuda.wanda.yaml
198+
env_file: rayci.env
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+
tags:
210+
- oss
211+
depends_on:
212+
- ray-wheel-build
213+
- ray-llmbaseextra-testdeps
214+
215+
- label: ":crane: publish: ray-llm-anyscale py{{matrix.python}} {{matrix.platform}}"
97216
key: anyscalellmbuild
98217
instance_type: release-medium
99218
mount_buildkite_agent: true
100219
tags:
101220
- oss
102221
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
222+
# Authenticate with GCP and Azure before pushing
223+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
224+
- bash release/azure_docker_login.sh
225+
- az acr login --name rayreleasetest
226+
# PATH must include gcloud SDK for crane to use docker credential helper
227+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
228+
bazel run //ci/ray_ci/automation:push_anyscale_image --
229+
--python-version {{matrix.python}}
230+
--platform {{matrix.platform}}
231+
--image-type ray-llm
232+
--upload
105233
depends_on:
106-
- manylinux-x86_64
107-
- forge
108-
- ray-llmbaseextra-testdeps
234+
- ray-llm-anyscale-cuda-build
109235
matrix:
110-
- "3.11"
236+
setup:
237+
python:
238+
- "3.11"
239+
platform:
240+
- cu12.8.1-cudnn
111241

112-
- label: ":tapioca: build: ray-ml py{{matrix}} image for release tests"
242+
- name: ray-ml-anyscale-cuda-build
243+
label: "wanda: ray-ml-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
244+
wanda: ci/docker/ray-ml-anyscale-cuda.wanda.yaml
245+
env_file: rayci.env
246+
matrix:
247+
setup:
248+
python:
249+
# This list should be kept in sync with the list of supported Python in
250+
# release test suite
251+
- "3.10"
252+
cuda:
253+
- "12.1.1-cudnn8"
254+
env:
255+
PYTHON_VERSION: "{{matrix.python}}"
256+
CUDA_VERSION: "{{matrix.cuda}}"
257+
ARCH_SUFFIX: ""
258+
tags:
259+
- oss
260+
depends_on:
261+
- ray-wheel-build
262+
- ray-mlcudabaseextra-testdeps
263+
264+
- label: ":crane: publish: 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:
126-
# This list should be kept in sync with the list of supported Python in
127-
# release test suite
128285
- "3.10"
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
@@ -345,3 +345,30 @@ py_test(
345345
ci_require("pytest"),
346346
],
347347
)
348+
349+
py_binary(
350+
name = "push_anyscale_image",
351+
srcs = ["push_anyscale_image.py"],
352+
exec_compatible_with = ["//bazel:py3"],
353+
deps = [
354+
":crane_lib",
355+
"//ci/ray_ci:ray_ci_lib",
356+
"//release:ray_release",
357+
ci_require("click"),
358+
],
359+
)
360+
361+
py_test(
362+
name = "test_push_anyscale_image",
363+
size = "small",
364+
srcs = ["test_push_anyscale_image.py"],
365+
exec_compatible_with = ["//bazel:py3"],
366+
tags = [
367+
"ci_unit",
368+
"team:ci",
369+
],
370+
deps = [
371+
":push_anyscale_image",
372+
ci_require("pytest"),
373+
],
374+
)

0 commit comments

Comments
 (0)