Skip to content

Commit

Permalink
[CI] add ray ci in github action
Browse files Browse the repository at this point in the history
Signed-off-by: sule <sule.sl@antgroup.com>
  • Loading branch information
xsuler committed Feb 24, 2025
1 parent 1519624 commit 5b7b1ce
Show file tree
Hide file tree
Showing 10 changed files with 1,104 additions and 42 deletions.
483 changes: 483 additions & 0 deletions .github/workflows/ray-ci.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build-docker-ant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ docker run --rm \
antgroup/base-deps:dev$GPU \
pip download --no-cache-dir --quiet --no-deps --only-binary=:all: "$ANT_RAY_PACKAGE" -d /wheels

WHEEL_FILE=$(ls "$RAY_BUILD_DIR"/.whl/*.whl 2>/dev/null | head -n1)
WHEEL_FILE=$(find "$RAY_BUILD_DIR/.whl" -name '*.whl' -type f -print -quit 2>/dev/null)
if [[ -z "$WHEEL_FILE" ]]; then
echo "Error: No wheel downloaded for ant-ray" >&2
exit 1
Expand Down
16 changes: 16 additions & 0 deletions ci/docker/core.build.ant.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG DOCKER_IMAGE_BASE
FROM $DOCKER_IMAGE_BASE

WORKDIR /rayci

RUN <<EOF
#!/bin/bash

set -euo pipefail

chmod 755 /usr/lib/sudo/sudoers.so
apt-get update && apt-get install -y --reinstall sudo

BUILD=1 DL=1 ./ci/env/install-dependencies.sh

EOF
1 change: 0 additions & 1 deletion ci/ray_ci/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def main(
"""
Build a wheel or jar artifact
"""
docker_login(_DOCKER_ECR_REPO.split("/")[0])
ci_init()
if artifact_type == "wheel":
logger.info(f"Building wheel for {python_version}")
Expand Down
12 changes: 9 additions & 3 deletions ci/ray_ci/linux_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def install_ray(self, build_type: Optional[str] = None) -> List[str]:
"-t",
self._get_docker_image(),
"-f",
"/ray/ci/ray_ci/tests.env.Dockerfile",
"/ray",
f"{os.environ.get('RAY_DIR')}/ci/ray_ci/tests.env.Dockerfile",
os.environ.get("RAY_DIR"),
],
env=env,
stdout=sys.stdout,
Expand Down Expand Up @@ -84,4 +84,10 @@ def get_run_command_extra_args(
return extra_args

def get_artifact_mount(self) -> Tuple[str, str]:
return ("/tmp/artifacts", "/artifact-mount")
os.makedirs(
os.path.join(os.environ.get("BAZEL_DIR"), "artifacts"), exist_ok=True
)
return (
os.path.join(os.environ.get("BAZEL_DIR"), "artifacts"),
os.environ.get("BAZEL_DIR"),
)
Loading

0 comments on commit 5b7b1ce

Please sign in to comment.