-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Mac M1 Support #14697
Comments
I got exactly the same problem, I spent so many hours configuring my Mac M1 to run machine learning librairies on it... I so regret buying this!! I installed bazel through Brew and compiled ray from source. |
@pierreia I hear your frustration but its been kind of fun. I was surprised Ray was still broken even with a Rosetta 2 instance with conda. But I have great news!!! IT COMPILED but it still won't run right. Thanks to nelhage advice, I noticed that the current boost rules should support Mac M1. The version that ray uses is just old so I just commented it out and added this in the bazel setup:
My next roadblock is that when I import ray, I get this error:
|
Hi, thank you for your answer, did you manage to solve this error? |
Unfortunately no, I tried a bunch of things and it did not work. I have a hunch its either gRPC or boringSSL that's breaking something. I'm leaning towards boringSSL and tried to make gRPC build with OpenSSL but my bazel skills is not good enough to make it work. |
@pierreia I tried everything with no luck. From building bazel from source (3 and 4) to changing all sorts bazel setup. However, I managed to make it work with Rosetta. I swear I tried this over 10 times a month ago but for some reason it works now. The downside is that you won't get the tensorflow acceleration but it still runs a bit faster than bare intel CPU. I did the following
I think in terms of native mac M1 ray, I'll have to wait for another couple months until some of the tools that ray uses are native as well. |
I'm starting to see the limitation of 8GB RAM. Ray is kinda heavy compared to others (for good reasons) so I clock out at 7.8 GB for a relatively simple model compared to around 6.5 for the same model with stable baseline. I think the shared unified memory makes it hard to run Ray effectively through Rosetta. |
I've built and tested the wheels to run Ray natively on M1 Macs, see this release. The versions of boost and grpc had to be updated. Edit: Updated release. |
@simonfall hey, can you share git diff that allows you to build the package? |
@iamhatesz Sure, just created this PR. Right now, none of Bazel's releases works out-of-the-box for M1 Macs. This should change with release 4.2.0 in the next weeks. The PR should then probably be complemented with some changes to CI/build scripts. |
This is fixed in #19037 and M1 wheels are released for Ray 1.8.0 :) |
Hello,
I am not sure if I should post this on the discuss channel or here but I have been trying to build Ray for the new Mac M1 CPU. Now that bazel, boost, and protobuf is natively supported, it seems possible but I am having issues with the boost bazel rules. I'm having the same exact issue as this ticket but with the M1 CPU. Does anyone have any insight on where to point the srcs and the config settings?
I have done the following:
Thank you!
The text was updated successfully, but these errors were encountered: