Skip to content

Commit

Permalink
[ci] remove old worker container test (#45422)
Browse files Browse the repository at this point in the history
super old, not used or tested anywhere anymore. was still using py36
images...

Signed-off-by: Lonnie Liu <[email protected]>
  • Loading branch information
aslonnie authored May 18, 2024
1 parent 566dd5e commit 6157e3b
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 203 deletions.
6 changes: 3 additions & 3 deletions .buildkite/serve.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ steps:
instance_type: large
commands:
- bazel run //ci/ray_ci:test_in_docker -- //python/ray/serve/... //python/ray/tests/... serve
--except-tags post_wheel_build,gpu,worker-container,ha_integration
--except-tags post_wheel_build,gpu,ha_integration
--workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}" --parallelism-per-worker 3
--build-name servebuild --test-env=EXPECTED_PYTHON_VERSION=3.9
depends_on: "servebuild"
Expand All @@ -51,7 +51,7 @@ steps:
soft_fail: true
commands:
- bazel run //ci/ray_ci:test_in_docker -- //python/ray/serve/... //python/ray/tests/... serve
--except-tags post_wheel_build,gpu,worker-container,ha_integration
--except-tags post_wheel_build,gpu,ha_integration
--workers "$${BUILDKITE_PARALLEL_JOB_COUNT}" --worker-id "$${BUILDKITE_PARALLEL_JOB}" --parallelism-per-worker 3
--build-name servepydantic1build --test-env=EXPECTED_PYTHON_VERSION=3.9 --test-env=EXPECTED_PYDANTIC_VERSION=1.10.12
depends_on: servepydantic1build
Expand All @@ -64,7 +64,7 @@ steps:
instance_type: large
commands:
- bazel run //ci/ray_ci:test_in_docker -- //python/ray/serve/... //python/ray/tests/... serve
--except-tags post_wheel_build,gpu,worker-container,ha_integration
--except-tags post_wheel_build,gpu,ha_integration
--workers 2 --worker-id {{matrix.worker_id}} --parallelism-per-worker 3
--python-version {{matrix.python}}
--test-env=EXPECTED_PYTHON_VERSION={{matrix.python}}
Expand Down
141 changes: 57 additions & 84 deletions ci/build/build-docker-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
),
"ray": "Official Docker Images for Ray, the distributed computing API.",
"ray-ml": "Developer ready Docker Image for Ray.",
"ray-worker-container": "Internal Image for CI test",
}

PY_MATRIX = {
Expand Down Expand Up @@ -227,15 +226,7 @@ def _build_docker_image(

device_tag = f"{image_type}"

if image_name == "base-deps":
base_image = BASE_IMAGES[image_type]
else:
base_image = _with_suffix(f"-{py_version}-{device_tag}", suffix=suffix)

if image_name != "ray-worker-container":
build_args["BASE_IMAGE"] = base_image

if image_name in ["ray", "ray-deps", "ray-worker-container"]:
if image_name in ["ray", "ray-deps"]:
wheel = _get_wheel_name(python_minor_version)
build_args["WHEEL_PATH"] = f".whl/{wheel}"
# Add pip option "--find-links .whl/" to ensure ray-cpp wheel
Expand Down Expand Up @@ -352,15 +343,10 @@ def copy_wheels(human_build):
source = os.path.join(root_dir, ".whl", wheel)
ray_dst = os.path.join(root_dir, "docker/ray/.whl/")
ray_dep_dst = os.path.join(root_dir, "docker/ray-deps/.whl/")
ray_worker_container_dst = os.path.join(
root_dir, "docker/ray-worker-container/.whl/"
)
os.makedirs(ray_dst, exist_ok=True)
shutil.copy(source, ray_dst)
os.makedirs(ray_dep_dst, exist_ok=True)
shutil.copy(source, ray_dep_dst)
os.makedirs(ray_worker_container_dst, exist_ok=True)
shutil.copy(source, ray_worker_container_dst)


def check_staleness(repository, tag):
Expand Down Expand Up @@ -832,18 +818,12 @@ def push_readmes(merge_build: bool):
default=True,
help="Whether to build base-deps & ray-deps",
)
@click.option(
"--only-build-worker-container/--no-only-build-worker-container",
default=False,
help="Whether only to build ray-worker-container",
)
def main(
py_versions: Tuple[str],
device_types: Tuple[str],
build_type: str,
suffix: Optional[str] = None,
build_base: bool = True,
only_build_worker_container: bool = False,
):
py_versions = (
list(py_versions) if isinstance(py_versions, (list, tuple)) else [py_versions]
Expand Down Expand Up @@ -903,7 +883,6 @@ def main(
if (
build_type in {HUMAN, MERGE, BUILDKITE, LOCAL, RELEASE_PR}
or _check_if_docker_files_modified()
or only_build_worker_container
):
is_merge = build_type == MERGE
# Buildkite is authenticated in the background.
Expand All @@ -917,75 +896,69 @@ def main(
py_versions, image_types, build_base, suffix=suffix
)

if only_build_worker_container:
build_for_all_versions(
"ray-worker-container", py_versions, image_types, suffix=suffix
)
# TODO Currently don't push ray_worker_container
else:
# Build Ray Docker images.
prep_ray_base()
# Build Ray Docker images.
prep_ray_base()

all_tagged_images = []
all_tagged_images = []

all_tagged_images += build_for_all_versions(
"ray", py_versions, image_types, suffix=suffix
)
all_tagged_images += build_for_all_versions(
"ray", py_versions, image_types, suffix=suffix
)

# List of images to tag and push to docker hub
images_to_tag_and_push = []

if is_base_images_built:
images_to_tag_and_push += ["base-deps", "ray-deps"]

# List of images to tag and push to docker hub
images_to_tag_and_push = []

if is_base_images_built:
images_to_tag_and_push += ["base-deps", "ray-deps"]

# Always tag/push ray
images_to_tag_and_push += ["ray"]

# Only build ML Docker images for ML_CUDA_VERSION or cpu.
if platform.processor() not in ADDITIONAL_PLATFORMS:
ml_image_types = [
image_type
for image_type in image_types
if image_type in [ML_CUDA_VERSION, "cpu"]
]
else:
# Do not build ray-ml e.g. for arm64
ml_image_types = []

# Only build ray-ml image for pythons in ML_IMAGES_PY_VERSIONS
ml_py_versions = [
py_version
for py_version in py_versions
if py_version in ML_IMAGES_PY_VERSIONS
# Always tag/push ray
images_to_tag_and_push += ["ray"]

# Only build ML Docker images for ML_CUDA_VERSION or cpu.
if platform.processor() not in ADDITIONAL_PLATFORMS:
ml_image_types = [
image_type
for image_type in image_types
if image_type in [ML_CUDA_VERSION, "cpu"]
]
else:
# Do not build ray-ml e.g. for arm64
ml_image_types = []

# Only build ray-ml image for pythons in ML_IMAGES_PY_VERSIONS
ml_py_versions = [
py_version
for py_version in py_versions
if py_version in ML_IMAGES_PY_VERSIONS
]

if len(ml_image_types) > 0:
prep_ray_ml()
all_tagged_images += build_for_all_versions(
"ray-ml",
ml_py_versions,
image_types=ml_image_types,
suffix=suffix,
)
images_to_tag_and_push += ["ray-ml"]
if len(ml_image_types) > 0:
prep_ray_ml()
all_tagged_images += build_for_all_versions(
"ray-ml",
ml_py_versions,
image_types=ml_image_types,
suffix=suffix,
)
images_to_tag_and_push += ["ray-ml"]

if is_buildkite:
extract_image_infos(
all_tagged_images, target_dir="/artifact-mount/.image-info"
)
if is_buildkite:
extract_image_infos(
all_tagged_images, target_dir="/artifact-mount/.image-info"
)

if build_type in {MERGE, RELEASE_PR}:
valid_branch = _valid_branch()
if (not valid_branch) and is_merge:
print(f"Invalid Branch found: {_get_branch()}")
push_and_tag_images(
py_versions,
image_types,
merge_build=valid_branch and is_merge,
release_pr_build=build_type == RELEASE_PR,
image_list=images_to_tag_and_push,
suffix=suffix,
)
if build_type in {MERGE, RELEASE_PR}:
valid_branch = _valid_branch()
if (not valid_branch) and is_merge:
print(f"Invalid Branch found: {_get_branch()}")
push_and_tag_images(
py_versions,
image_types,
merge_build=valid_branch and is_merge,
release_pr_build=build_type == RELEASE_PR,
image_list=images_to_tag_and_push,
suffix=suffix,
)

# TODO(ilr) Re-Enable Push READMEs by using a normal password
# (not auth token :/)
Expand Down
31 changes: 0 additions & 31 deletions ci/build/test-worker-in-container.sh

This file was deleted.

10 changes: 0 additions & 10 deletions python/ray/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -729,16 +729,6 @@ py_test_module_list(
deps = ["//:ray_lib", ":conftest"],
)

py_test_module_list(
files = [
"test_actor_in_container.py",
],
size = "large",
tags = ["exclusive", "worker-container", "team:serve"],
# Now we run this test in a container which has installed ray
deps = [],
)

py_test_module_list(
files = [
"test_object_spilling.py",
Expand Down
75 changes: 0 additions & 75 deletions python/ray/tests/test_actor_in_container.py

This file was deleted.

0 comments on commit 6157e3b

Please sign in to comment.