Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Build wheels for Linux ARM64 #31522

Merged
merged 27 commits into from
Jan 9, 2023
Merged

[ci] Build wheels for Linux ARM64 #31522

merged 27 commits into from
Jan 9, 2023

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Jan 7, 2023

Why are these changes needed?

We currently only build linux wheels for x86_64. This means that users e.g. on Mac M1 machines can't run Ray in docker, as this would require linux/aarch64 (arm64) architecture wheels.

This PR updates our CI to:

  • Install bazel for arm64 architecture
  • Build and upload wheels for arm64 architecture

Related issue number

Closes #13780
Closes #21786
Closes #28103

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Kai Fricke added 17 commits January 6, 2023 11:00
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Kai Fricke added 2 commits January 7, 2023 20:19
Signed-off-by: Kai Fricke <kai@anyscale.com>
@wuisawesome
Copy link
Contributor

Nice! I tried running the docker image on my M1 machine and it works. A few follow up questions about what we call "complete" here.

  1. Do we need any docs for this?
  2. Related, do we need to take any additional action to make sure the dockerhub images get pushed during the release process?
  3. It doesn't seem like we're building/publishing any wheels. Should we be doing that and publishing them to s3/pypi?

Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke
Copy link
Contributor Author

krfricke commented Jan 8, 2023

I've also confirmed that the wheels work on graviton instances and can run example scripts.

I've now also added the post-wheels tests and debug wheels for ARM64.

We can also pick this onto Ray 2.2.0 branch to build wheels for the latest release.

Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke requested a review from a team as a code owner January 8, 2023 11:09
Signed-off-by: Kai Fricke <kai@anyscale.com>
commands:
# Build the debug wheels
- RAY_DEBUG_BUILD=debug LINUX_WHEELS=1 ./ci/ci.sh build
# Upload the wheels.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are debug wheels distinguished from non-debug ones when uploading?

Copy link
Contributor Author

@krfricke krfricke Jan 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have a +dbg suffix! Example: ray-3.0.0.dev0+dbg-cp38-cp38-linux_aarch64.whl dist/ray_cpp-3.0.0.dev0+dbg-cp38-cp38-linux_aarch64.whl

Signed-off-by: Kai Fricke <kai@anyscale.com>
@pcmoritz
Copy link
Contributor

pcmoritz commented Jan 8, 2023

Very excited to see this, thanks for doing it Kai ❤️

Kai Fricke added 4 commits January 8, 2023 19:28
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke
Copy link
Contributor Author

krfricke commented Jan 9, 2023

Looks like everything is passing. The debug wheels take ~3 hours and time out sometimes (our limit is 3h at the moment). I've disabled them for now - when we actually need them, we can look into enabling this and speeding it up (e.g. adding a bigger runner, or avoiding some recompilation).

I'll merge once this passed

@richardliaw
Copy link
Contributor

hmm why is docker build failing

@krfricke
Copy link
Contributor Author

krfricke commented Jan 9, 2023

The docker failures should be unrelated (they use different docker files and we've seen this being flaky before).

@krfricke krfricke merged commit 3011cd1 into master Jan 9, 2023
@krfricke krfricke deleted the ci/linux-aarm64 branch January 9, 2023 19:04
krfricke added a commit to krfricke/ray that referenced this pull request Jan 10, 2023
We currently only build linux wheels for x86_64. This means that users e.g. on Mac M1 machines can't run Ray in docker, as this would require linux/aarch64 (arm64) architecture wheels.

This PR updates our CI to:

- Install bazel for arm64 architecture
- Build and upload wheels for arm64 architecture

Signed-off-by: Kai Fricke <kai@anyscale.com>
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
We currently only build linux wheels for x86_64. This means that users e.g. on Mac M1 machines can't run Ray in docker, as this would require linux/aarch64 (arm64) architecture wheels.

This PR updates our CI to:

- Install bazel for arm64 architecture
- Build and upload wheels for arm64 architecture

Signed-off-by: Kai Fricke <kai@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants