Skip to content

Commit fc711fb

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: ray-image Labels: draft Signed-off-by: andrew <andrew@anyscale.com>
1 parent 275827a commit fc711fb

File tree

8 files changed

+741
-22
lines changed

8 files changed

+741
-22
lines changed

.buildkite/release/build.rayci.yml

Lines changed: 176 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
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+
HOSTTYPE: "x86_64"
23+
MANYLINUX_VERSION: "260103.868e54c"
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:
31+
ARCH_SUFFIX: ""
32+
HOSTTYPE: "x86_64"
33+
MANYLINUX_VERSION: "260103.868e54c"
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:
43+
PYTHON_VERSION: "{{matrix}}"
44+
ARCH_SUFFIX: ""
45+
HOSTTYPE: "x86_64"
46+
MANYLINUX_VERSION: "260103.868e54c"
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
@@ -67,62 +117,166 @@ steps:
67117
depends_on:
68118
- ray-mlcudabaseextra
69119

70-
- label: ":tapioca: build: ray py{{matrix.python}}-{{matrix.platform}} image for release tests"
120+
# Build ray anyscale images using wanda (CPU)
121+
- name: ray-anyscale-cpu-build
122+
label: "wanda: ray-anyscale py{{matrix}} cpu"
123+
wanda: ci/docker/ray-anyscale-cpu.wanda.yaml
124+
matrix:
125+
# This list should be kept in sync with the list of supported Python in
126+
# release test suite
127+
- "3.10"
128+
- "3.11"
129+
- "3.12"
130+
env:
131+
PYTHON_VERSION: "{{matrix}}"
132+
ARCH_SUFFIX: ""
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+
tags:
156+
- oss
157+
depends_on:
158+
- ray-wheel-build
159+
- raycudabaseextra-testdeps
160+
161+
# Push anyscale images to ECR/GCP/Azure registries
162+
- label: ":docker: push: ray-anyscale py{{matrix.python}} {{matrix.platform}}"
71163
key: anyscalebuild
72164
instance_type: release-medium
73165
mount_buildkite_agent: true
74166
tags:
75167
- oss
76168
commands:
77-
- bazel run //ci/ray_ci:build_in_docker -- anyscale
78-
--python-version {{matrix.python}} --platform {{matrix.platform}}
79-
--image-type ray --upload
169+
# Authenticate with GCP and Azure before pushing
170+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
171+
- bash release/azure_docker_login.sh
172+
- az acr login --name rayreleasetest
173+
# PATH must include gcloud SDK for crane to use docker credential helper
174+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
175+
bazel run //ci/ray_ci/automation:push_anyscale_image --
176+
--python-version {{matrix.python}}
177+
--platform {{matrix.platform}}
178+
--image-type ray
179+
--upload
80180
depends_on:
81-
- manylinux-x86_64
82-
- forge
83-
- raycpubaseextra-testdeps
84-
- raycudabaseextra-testdeps
181+
- ray-anyscale-cpu-build
182+
- ray-anyscale-cuda-build
85183
matrix:
86184
setup:
87185
python:
88-
# This list should be kept in sync with the list of supported Python in
89-
# release test suite
90186
- "3.10"
91187
- "3.11"
92188
- "3.12"
93189
platform:
94190
- cu12.3.2-cudnn9
95191
- cpu
96192

97-
- label: ":tapioca: build: ray-llm py{{matrix}} image for release tests"
193+
# Build ray-llm anyscale image using wanda
194+
- name: ray-llm-anyscale-cuda-build
195+
label: "wanda: ray-llm-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
196+
wanda: ci/docker/ray-llm-anyscale-cuda.wanda.yaml
197+
matrix:
198+
setup:
199+
python:
200+
- "3.11"
201+
cuda:
202+
- "12.8.1-cudnn"
203+
env:
204+
PYTHON_VERSION: "{{matrix.python}}"
205+
CUDA_VERSION: "{{matrix.cuda}}"
206+
ARCH_SUFFIX: ""
207+
tags:
208+
- oss
209+
depends_on:
210+
- ray-wheel-build
211+
- ray-llmbaseextra-testdeps
212+
213+
# Push ray-llm anyscale images to ECR/GCP/Azure registries
214+
- label: ":docker: push: ray-llm-anyscale py{{matrix}} cu12.8.1-cudnn"
98215
key: anyscalellmbuild
99216
instance_type: release-medium
100217
mount_buildkite_agent: true
101218
tags:
102219
- oss
103220
commands:
104-
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
105-
--platform cu12.8.1-cudnn --image-type ray-llm --upload
221+
# Authenticate with GCP and Azure before pushing
222+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
223+
- bash release/azure_docker_login.sh
224+
- az acr login --name rayreleasetest
225+
# PATH must include gcloud SDK for crane to use docker credential helper
226+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
227+
bazel run //ci/ray_ci/automation:push_anyscale_image --
228+
--python-version {{matrix}}
229+
--platform cu12.8.1-cudnn
230+
--image-type ray-llm
231+
--upload
106232
depends_on:
107-
- manylinux-x86_64
108-
- forge
109-
- ray-llmbaseextra-testdeps
233+
- ray-llm-anyscale-cuda-build
110234
matrix:
111235
- "3.11"
112236

113-
- label: ":tapioca: build: ray-ml py{{matrix}} image for release tests"
237+
# Build ray-ml anyscale image using wanda
238+
- name: ray-ml-anyscale-cuda-build
239+
label: "wanda: ray-ml-anyscale py{{matrix.python}} cu{{matrix.cuda}}"
240+
wanda: ci/docker/ray-ml-anyscale-cuda.wanda.yaml
241+
matrix:
242+
setup:
243+
python:
244+
# This list should be kept in sync with the list of supported Python in
245+
# release test suite
246+
- "3.10"
247+
cuda:
248+
- "12.1.1-cudnn8"
249+
env:
250+
PYTHON_VERSION: "{{matrix.python}}"
251+
CUDA_VERSION: "{{matrix.cuda}}"
252+
ARCH_SUFFIX: ""
253+
tags:
254+
- oss
255+
depends_on:
256+
- ray-wheel-build
257+
- ray-mlcudabaseextra-testdeps
258+
259+
# Push ray-ml anyscale images to ECR/GCP/Azure registries
260+
- label: ":docker: push: ray-ml-anyscale py{{matrix}} cu12.1.1-cudnn8"
114261
key: anyscalemlbuild
115262
instance_type: release-medium
116263
mount_buildkite_agent: true
117264
tags:
118265
- oss
119266
commands:
120-
- bazel run //ci/ray_ci:build_in_docker -- anyscale --python-version {{matrix}}
121-
--platform cu12.1.1-cudnn8 --image-type ray-ml --upload
267+
# Authenticate with GCP and Azure before pushing
268+
- bash release/gcloud_docker_login.sh release/aws2gce_iam.json
269+
- bash release/azure_docker_login.sh
270+
- az acr login --name rayreleasetest
271+
# PATH must include gcloud SDK for crane to use docker credential helper
272+
- export PATH=$(pwd)/google-cloud-sdk/bin:$PATH &&
273+
bazel run //ci/ray_ci/automation:push_anyscale_image --
274+
--python-version {{matrix}}
275+
--platform cu12.1.1-cudnn8
276+
--image-type ray-ml
277+
--upload
122278
depends_on:
123-
- manylinux-x86_64
124-
- forge
125-
- ray-mlcudabaseextra-testdeps
279+
- ray-ml-anyscale-cuda-build
126280
matrix:
127281
# This list should be kept in sync with the list of supported Python in
128282
# release test suite
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
srcs:
15+
- python/requirements_compiled.txt
16+
build_args:
17+
- PYTHON_VERSION
18+
- ARCH_SUFFIX
19+
- BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra-testdeps
20+
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
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+
srcs:
15+
- python/requirements_compiled.txt
16+
build_args:
17+
- PYTHON_VERSION
18+
- CUDA_VERSION
19+
- ARCH_SUFFIX
20+
- BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
21+
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
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+
srcs:
14+
- python/requirements_compiled.txt
15+
build_args:
16+
- PYTHON_VERSION
17+
- CUDA_VERSION
18+
- ARCH_SUFFIX
19+
- BASE_IMAGE=cr.ray.io/rayproject/ray-llm-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
20+
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX
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+
srcs:
14+
- python/requirements_compiled.txt
15+
build_args:
16+
- PYTHON_VERSION
17+
- CUDA_VERSION
18+
- ARCH_SUFFIX
19+
- BASE_IMAGE=cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra-testdeps
20+
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX

ci/ray_ci/automation/BUILD.bazel

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,30 @@ py_test(
331331
ci_require("pytest"),
332332
],
333333
)
334+
335+
py_binary(
336+
name = "push_anyscale_image",
337+
srcs = ["push_anyscale_image.py"],
338+
exec_compatible_with = ["//bazel:py3"],
339+
deps = [
340+
":crane_lib",
341+
"//ci/ray_ci:ray_ci_lib",
342+
"//release:ray_release",
343+
ci_require("click"),
344+
],
345+
)
346+
347+
py_test(
348+
name = "test_push_anyscale_image",
349+
size = "small",
350+
srcs = ["test_push_anyscale_image.py"],
351+
exec_compatible_with = ["//bazel:py3"],
352+
tags = [
353+
"ci_unit",
354+
"team:ci",
355+
],
356+
deps = [
357+
":push_anyscale_image",
358+
ci_require("pytest"),
359+
],
360+
)

0 commit comments

Comments
 (0)