Skip to content

Commit c275fe2

Browse files
Add wanda ray image builds for Docker Hub
This adds wanda-based builds for ray Docker Hub images. Changes: - Add ray-image-cpu/cuda.wanda.yaml for ray images - Add ray-extra-image-cpu/cuda.wanda.yaml for extra dependencies - Add ray-llm-image-cuda.wanda.yaml and ray-llm-extra variant - Add push_ray_image.py for pushing to Docker Hub via crane - Update build.rayci.yml with wanda image build and push steps Topic: ray-image Relative: ray-wheel Labels: draft Signed-off-by: andrew <andrew@anyscale.com>
1 parent 8a4bdf5 commit c275fe2

11 files changed

+991
-46
lines changed

.buildkite/build.rayci.yml

Lines changed: 270 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -89,89 +89,311 @@ steps:
8989
depends_on: manylinux-x86_64
9090
job_env: manylinux-x86_64
9191

92-
- label: ":tapioca: build: ray py{{matrix}} docker (x86_64)"
93-
key: ray_images
92+
- name: ray-image-cpu-build
93+
label: "wanda: ray py{{matrix}} cpu (x86_64)"
94+
wanda: ci/docker/ray-image-cpu.wanda.yaml
95+
matrix:
96+
- "3.10"
97+
- "3.11"
98+
- "3.12"
99+
env:
100+
PYTHON_VERSION: "{{matrix}}"
101+
ARCH_SUFFIX: ""
94102
tags:
95103
- python_dependencies
96104
- docker
97105
- oss
98-
instance_type: medium
99-
commands:
100-
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
101-
--platform cu11.7.1-cudnn8 --platform cu11.8.0-cudnn8
102-
--platform cu12.1.1-cudnn8 --platform cu12.3.2-cudnn9
103-
--platform cu12.4.1-cudnn --platform cu12.5.1-cudnn
104-
--platform cu12.6.3-cudnn --platform cu12.8.1-cudnn
105-
--platform cu12.9.1-cudnn
106-
--platform cpu
107-
--image-type ray --upload
108106
depends_on:
109-
- manylinux-x86_64
110-
- forge
111-
- raycudabase
107+
- ray-wheel-build
112108
- raycpubase
109+
110+
# Push ray CPU images to Docker Hub
111+
- label: ":docker: push: ray py{{matrix}} cpu (x86_64)"
112+
key: ray_images_cpu_push
113+
instance_type: small
114+
commands:
115+
- bazel run //.buildkite:copy_files -- --destination docker_login
116+
- bazel run //ci/ray_ci/automation:push_ray_image --
117+
--python-version {{matrix}}
118+
--platform cpu
119+
--image-type ray
120+
--upload
113121
matrix:
114122
- "3.10"
115123
- "3.11"
116124
- "3.12"
125+
depends_on:
126+
- ray-image-cpu-build
127+
tags:
128+
- python_dependencies
129+
- docker
130+
- skip-on-premerge
131+
- oss
117132

118-
- label: ":tapioca: build: ray-extra py{{matrix}} docker (x86_64)"
119-
key: ray_extra_images
133+
- name: ray-image-cuda-build
134+
label: "wanda: ray py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
135+
wanda: ci/docker/ray-image-cuda.wanda.yaml
136+
matrix:
137+
setup:
138+
python:
139+
- "3.10"
140+
- "3.11"
141+
- "3.12"
142+
cuda:
143+
- "11.7.1-cudnn8"
144+
- "11.8.0-cudnn8"
145+
- "12.1.1-cudnn8"
146+
- "12.3.2-cudnn9"
147+
- "12.4.1-cudnn"
148+
- "12.5.1-cudnn"
149+
- "12.6.3-cudnn"
150+
- "12.8.1-cudnn"
151+
- "12.9.1-cudnn"
152+
env:
153+
PYTHON_VERSION: "{{matrix.python}}"
154+
CUDA_VERSION: "{{matrix.cuda}}"
155+
ARCH_SUFFIX: ""
120156
tags:
121157
- python_dependencies
122158
- docker
123159
- oss
124-
instance_type: medium
160+
depends_on:
161+
- ray-wheel-build
162+
- raycudabase
163+
164+
# Push ray CUDA images to Docker Hub
165+
- label: ":docker: push: ray py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
166+
key: ray_images_cuda_push
167+
instance_type: small
125168
commands:
126-
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
127-
--platform cu11.7.1-cudnn8 --platform cu11.8.0-cudnn8
128-
--platform cu12.1.1-cudnn8 --platform cu12.3.2-cudnn9
129-
--platform cu12.4.1-cudnn --platform cu12.5.1-cudnn
130-
--platform cu12.6.3-cudnn --platform cu12.8.1-cudnn
131-
--platform cu12.9.1-cudnn
132-
--platform cpu
133-
--image-type ray-extra --upload
169+
- bazel run //.buildkite:copy_files -- --destination docker_login
170+
- bazel run //ci/ray_ci/automation:push_ray_image --
171+
--python-version {{matrix.python}}
172+
--platform cu{{matrix.cuda}}
173+
--image-type ray
174+
--upload
175+
matrix:
176+
setup:
177+
python:
178+
- "3.10"
179+
- "3.11"
180+
- "3.12"
181+
cuda:
182+
- "11.7.1-cudnn8"
183+
- "11.8.0-cudnn8"
184+
- "12.1.1-cudnn8"
185+
- "12.3.2-cudnn9"
186+
- "12.4.1-cudnn"
187+
- "12.5.1-cudnn"
188+
- "12.6.3-cudnn"
189+
- "12.8.1-cudnn"
190+
- "12.9.1-cudnn"
134191
depends_on:
135-
- manylinux-x86_64
136-
- forge
137-
- raycpubaseextra
138-
- raycudabaseextra
192+
- ray-image-cuda-build
193+
tags:
194+
- python_dependencies
195+
- docker
196+
- skip-on-premerge
197+
- oss
198+
199+
- name: ray-extra-image-cpu-build
200+
label: "wanda: ray-extra py{{matrix}} cpu (x86_64)"
201+
wanda: ci/docker/ray-extra-image-cpu.wanda.yaml
139202
matrix:
140203
- "3.10"
141204
- "3.11"
142205
- "3.12"
206+
env:
207+
PYTHON_VERSION: "{{matrix}}"
208+
ARCH_SUFFIX: ""
209+
tags:
210+
- python_dependencies
211+
- docker
212+
- oss
213+
depends_on:
214+
- ray-wheel-build
215+
- raycpubaseextra
143216

144-
- label: ":tapioca: build: ray-llm py{{matrix}} docker (x86_64)"
217+
- name: ray-extra-image-cuda-build
218+
label: "wanda: ray-extra py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
219+
wanda: ci/docker/ray-extra-image-cuda.wanda.yaml
220+
matrix:
221+
setup:
222+
python:
223+
- "3.10"
224+
- "3.11"
225+
- "3.12"
226+
cuda:
227+
- "11.7.1-cudnn8"
228+
- "11.8.0-cudnn8"
229+
- "12.1.1-cudnn8"
230+
- "12.3.2-cudnn9"
231+
- "12.4.1-cudnn"
232+
- "12.5.1-cudnn"
233+
- "12.6.3-cudnn"
234+
- "12.8.1-cudnn"
235+
- "12.9.1-cudnn"
236+
env:
237+
PYTHON_VERSION: "{{matrix.python}}"
238+
CUDA_VERSION: "{{matrix.cuda}}"
239+
ARCH_SUFFIX: ""
145240
tags:
146241
- python_dependencies
147242
- docker
148243
- oss
149-
instance_type: medium
150-
commands:
151-
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
152-
--platform cu12.8.1-cudnn --image-type ray-llm --upload
153244
depends_on:
154-
- manylinux-x86_64
155-
- forge
245+
- ray-wheel-build
246+
- raycudabaseextra
247+
248+
- name: ray-llm-image-cuda-build
249+
label: "wanda: ray-llm py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
250+
wanda: ci/docker/ray-llm-image-cuda.wanda.yaml
251+
matrix:
252+
setup:
253+
python:
254+
- "3.11"
255+
cuda:
256+
- "12.8.1-cudnn"
257+
env:
258+
PYTHON_VERSION: "{{matrix.python}}"
259+
CUDA_VERSION: "{{matrix.cuda}}"
260+
ARCH_SUFFIX: ""
261+
tags:
262+
- python_dependencies
263+
- docker
264+
- oss
265+
depends_on:
266+
- ray-wheel-build
156267
- ray-llmbase
268+
269+
- name: ray-llm-extra-image-cuda-build
270+
label: "wanda: ray-llm-extra py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
271+
wanda: ci/docker/ray-llm-extra-image-cuda.wanda.yaml
272+
matrix:
273+
setup:
274+
python:
275+
- "3.11"
276+
cuda:
277+
- "12.8.1-cudnn"
278+
env:
279+
PYTHON_VERSION: "{{matrix.python}}"
280+
CUDA_VERSION: "{{matrix.cuda}}"
281+
ARCH_SUFFIX: ""
282+
tags:
283+
- python_dependencies
284+
- docker
285+
- oss
286+
depends_on:
287+
- ray-wheel-build
288+
- ray-llmbaseextra
289+
290+
# Push ray-extra CPU images to Docker Hub (goes to rayproject/ray)
291+
- label: ":docker: push: ray-extra py{{matrix}} cpu (x86_64)"
292+
key: ray_extra_images_cpu_push
293+
instance_type: small
294+
commands:
295+
- bazel run //.buildkite:copy_files -- --destination docker_login
296+
- bazel run //ci/ray_ci/automation:push_ray_image --
297+
--python-version {{matrix}}
298+
--platform cpu
299+
--image-type ray-extra
300+
--upload
157301
matrix:
302+
- "3.10"
158303
- "3.11"
304+
- "3.12"
305+
depends_on:
306+
- ray-extra-image-cpu-build
307+
tags:
308+
- python_dependencies
309+
- docker
310+
- skip-on-premerge
311+
- oss
159312

160-
- label: ":tapioca: build: ray-llm-extra py{{matrix}} docker (x86_64)"
313+
# Push ray-extra CUDA images to Docker Hub (goes to rayproject/ray)
314+
- label: ":docker: push: ray-extra py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
315+
key: ray_extra_images_cuda_push
316+
instance_type: small
317+
commands:
318+
- bazel run //.buildkite:copy_files -- --destination docker_login
319+
- bazel run //ci/ray_ci/automation:push_ray_image --
320+
--python-version {{matrix.python}}
321+
--platform cu{{matrix.cuda}}
322+
--image-type ray-extra
323+
--upload
324+
matrix:
325+
setup:
326+
python:
327+
- "3.10"
328+
- "3.11"
329+
- "3.12"
330+
cuda:
331+
- "11.7.1-cudnn8"
332+
- "11.8.0-cudnn8"
333+
- "12.1.1-cudnn8"
334+
- "12.3.2-cudnn9"
335+
- "12.4.1-cudnn"
336+
- "12.5.1-cudnn"
337+
- "12.6.3-cudnn"
338+
- "12.8.1-cudnn"
339+
- "12.9.1-cudnn"
340+
depends_on:
341+
- ray-extra-image-cuda-build
161342
tags:
162343
- python_dependencies
163344
- docker
345+
- skip-on-premerge
164346
- oss
165-
instance_type: medium
347+
348+
# Push ray-llm CUDA images to Docker Hub (goes to rayproject/ray-llm)
349+
- label: ":docker: push: ray-llm py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
350+
key: ray_llm_images_cuda_push
351+
instance_type: small
166352
commands:
167-
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
168-
--platform cu12.8.1-cudnn --image-type ray-llm-extra --upload
353+
- bazel run //.buildkite:copy_files -- --destination docker_login
354+
- bazel run //ci/ray_ci/automation:push_ray_image --
355+
--python-version {{matrix.python}}
356+
--platform cu{{matrix.cuda}}
357+
--image-type ray-llm
358+
--upload
359+
matrix:
360+
setup:
361+
python:
362+
- "3.11"
363+
cuda:
364+
- "12.8.1-cudnn"
169365
depends_on:
170-
- manylinux-x86_64
171-
- forge
172-
- ray-llmbaseextra
366+
- ray-llm-image-cuda-build
367+
tags:
368+
- python_dependencies
369+
- docker
370+
- skip-on-premerge
371+
- oss
372+
373+
# Push ray-llm-extra CUDA images to Docker Hub (goes to rayproject/ray-llm)
374+
- label: ":docker: push: ray-llm-extra py{{matrix.python}} cu{{matrix.cuda}} (x86_64)"
375+
key: ray_llm_extra_images_cuda_push
376+
instance_type: small
377+
commands:
378+
- bazel run //.buildkite:copy_files -- --destination docker_login
379+
- bazel run //ci/ray_ci/automation:push_ray_image --
380+
--python-version {{matrix.python}}
381+
--platform cu{{matrix.cuda}}
382+
--image-type ray-llm-extra
383+
--upload
173384
matrix:
174-
- "3.11"
385+
setup:
386+
python:
387+
- "3.11"
388+
cuda:
389+
- "12.8.1-cudnn"
390+
depends_on:
391+
- ray-llm-extra-image-cuda-build
392+
tags:
393+
- python_dependencies
394+
- docker
395+
- skip-on-premerge
396+
- oss
175397

176398
- label: ":tapioca: smoke test build-docker.sh"
177399
tags:
@@ -188,6 +410,7 @@ steps:
188410
depends_on:
189411
- forge
190412

413+
# Generate nightly indexes after images are pushed
191414
- label: ":tapioca: generate nightly indexes"
192415
instance_type: small
193416
tags:
@@ -198,6 +421,7 @@ steps:
198421
- bazel run .buildkite:copy_files -- --destination docker_login
199422
- bazel run //ci/ray_ci/automation:generate_index -- --prefix nightly
200423
depends_on:
201-
- ray_images
424+
- ray_images_cpu_push
425+
- ray_images_cuda_push
202426
- ray_images_aarch64
203427
- forge
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Ray Extra CPU Image
2+
# Installs ray wheel into the CPU base-extra image
3+
#
4+
# This produces the final rayproject/ray image with -extra tag for CPU-only deployments.
5+
# The base-extra image includes additional Python dependencies beyond base.
6+
#
7+
name: "ray-extra-py$PYTHON_VERSION-cpu$ARCH_SUFFIX"
8+
disable_caching: true
9+
froms:
10+
- "cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra$ARCH_SUFFIX" # CPU base-extra image
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+
- ARCH_SUFFIX
18+
- BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base-extra$ARCH_SUFFIX
19+
- RAY_WHEEL_IMAGE=cr.ray.io/rayproject/ray-wheel-py$PYTHON_VERSION$ARCH_SUFFIX

0 commit comments

Comments
 (0)