Skip to content

Commit 0d56f3e

Browse files
authored
[images][deps] raydepsets base extra depset (#58461)
generating depsets for base extra python requirements Installing requirements in base extra image --------- Signed-off-by: elliot-barn <[email protected]>
1 parent df65225 commit 0d56f3e

File tree

10 files changed

+11326
-21
lines changed

10 files changed

+11326
-21
lines changed

.buildkite/_images.rayci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ steps:
2828
PYTHON_VERSION: "{{matrix}}"
2929
IMAGE_TYPE: "ray"
3030
ARCH_SUFFIX: ""
31+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix}}.lock"
3132
depends_on: raycpubase
3233

3334
- name: raycudabase
@@ -81,6 +82,7 @@ steps:
8182
CUDA_VERSION: "{{matrix.cuda}}"
8283
IMAGE_TYPE: "ray"
8384
ARCH_SUFFIX: ""
85+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix.python}}.lock"
8486
depends_on: raycudabase
8587

8688
- name: ray-llmbase
@@ -114,6 +116,7 @@ steps:
114116
CUDA_VERSION: "{{matrix.cuda}}"
115117
IMAGE_TYPE: "ray-llm"
116118
ARCH_SUFFIX: ""
119+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix.python}}.lock"
117120
depends_on: ray-llmbase
118121

119122
- name: ray-mlcpubase
@@ -141,6 +144,7 @@ steps:
141144
PYTHON_VERSION: "{{matrix}}"
142145
IMAGE_TYPE: "ray-ml"
143146
ARCH_SUFFIX: ""
147+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix}}.lock"
144148
depends_on: ray-mlcpubase
145149

146150
- name: ray-mlcudabase
@@ -178,6 +182,7 @@ steps:
178182
CUDA_VERSION: "{{matrix.cuda}}"
179183
IMAGE_TYPE: "ray-ml"
180184
ARCH_SUFFIX: ""
185+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix.python}}.lock"
181186
depends_on: ray-mlcudabase
182187

183188
- name: ray-slimcpubase

.buildkite/linux_aarch64.rayci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ steps:
5454
PYTHON_VERSION: "{{matrix}}"
5555
IMAGE_TYPE: "ray"
5656
ARCH_SUFFIX: "-aarch64"
57+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix}}.lock"
5758
depends_on: raycpubase-aarch64
5859

5960
- name: raycudabase-aarch64
@@ -109,6 +110,7 @@ steps:
109110
CUDA_VERSION: "{{matrix.cuda}}"
110111
IMAGE_TYPE: "ray"
111112
ARCH_SUFFIX: "-aarch64"
113+
REQUIREMENTS_FILE: "ray_base_extra_py{{matrix.python}}.lock"
112114
depends_on: raycudabase-aarch64
113115

114116
- name: ray-core-build-aarch64

ci/raydepsets/configs/rayimg.depsets.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,22 @@ depsets:
134134
build_arg_sets:
135135
- py39
136136
- py310
137+
138+
# Second layer of the ray release images. Contains anyscale cli deps (and others)
139+
# and is a subset of the base extra test deps defined above (release image depset)
140+
- name: ray_base_extra_${PYTHON_SHORT}
141+
operation: subset
142+
source_depset: ray_base_extra_testdeps_${PYTHON_SHORT}
143+
requirements:
144+
- docker/base-deps/requirements.in
145+
- docker/base-extra/requirements.in
146+
output: python/deplocks/base_extra/ray_base_extra_py${PYTHON_VERSION}.lock
147+
append_flags:
148+
- --unsafe-package ray
149+
- --python-version=${PYTHON_VERSION}
150+
- --python-platform=linux
151+
build_arg_sets:
152+
- py39
153+
- py310
154+
- py311
155+
- py312

docker/base-extra/Dockerfile

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ ENV TERM=xterm
88

99
ARG SSH_PORT=5020
1010

11+
ARG PYTHON_DEPSET
12+
13+
COPY "$PYTHON_DEPSET" /home/ray/python_depset.lock
14+
1115
RUN <<EOF
1216
#!/bin/bash
1317

@@ -88,29 +92,10 @@ if [[ "$ARCH" == "x86_64" ]]; then
8892
rm -rf "${DYNOLOG_TMP}"
8993
fi
9094

91-
# Python dependencies to install. To specify a version, please make the change
92-
# in OSS ray repository, but not here.
93-
PYTHON_REQUIREMENTS=(
94-
azure-identity
95-
jupyterlab
96-
ipywidgets
97-
grpcio
98-
grpcio-tools
99-
100-
# Pinning jupyter_server_terminals==0.4.4 , the higher version will break the
101-
# webterminal when using an older version of terminado.
102-
jupyter_server_terminals==0.4.4
103-
104-
# [backend] is for installing anyscale CLI for use in the anyscale cloud.
105-
"anyscale[backend]"
106-
)
107-
108-
10995
PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
11096

111-
uv pip install --system --no-cache-dir --index-strategy unsafe-best-match \
112-
-c /home/ray/requirements_compiled.txt \
113-
"${PYTHON_REQUIREMENTS[@]}"
97+
uv pip install --system --no-cache-dir --no-deps --index-strategy unsafe-best-match \
98+
-r $HOME/python_depset.lock
11499

115100
# Install awscli v2
116101
AWSCLI_TMP="$(mktemp -d)"

docker/base-extra/cpu.wanda.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: "$IMAGE_TYPE-py$PYTHON_VERSION-cpu-base-extra$ARCH_SUFFIX"
22
froms: ["cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cpu-base$ARCH_SUFFIX"]
33
dockerfile: docker/base-extra/Dockerfile
4+
srcs:
5+
- python/deplocks/base_extra/$REQUIREMENTS_FILE
46
build_args:
57
- BASE_IMAGE=cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cpu-base$ARCH_SUFFIX
8+
- PYTHON_DEPSET=python/deplocks/base_extra/$REQUIREMENTS_FILE
69
tags:
710
- cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cpu-base-extra$ARCH_SUFFIX

docker/base-extra/cuda.wanda.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: "$IMAGE_TYPE-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra$ARCH_SUFFIX"
22
froms: ["cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cu$CUDA_VERSION-base$ARCH_SUFFIX"]
33
dockerfile: docker/base-extra/Dockerfile
4+
srcs:
5+
- python/deplocks/base_extra/$REQUIREMENTS_FILE
46
build_args:
57
- BASE_IMAGE=cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cu$CUDA_VERSION-base$ARCH_SUFFIX
8+
- PYTHON_DEPSET=python/deplocks/base_extra/$REQUIREMENTS_FILE
69
tags:
710
- cr.ray.io/rayproject/$IMAGE_TYPE-py$PYTHON_VERSION-cu$CUDA_VERSION-base-extra$ARCH_SUFFIX

0 commit comments

Comments
 (0)