ray icon indicating copy to clipboard operation
ray copied to clipboard

Build ARM wheels for Ray

Open wuisawesome opened this issue 4 years ago • 8 comments

Due to user demand, we may eventually want to support ARM builds. For now, here are some instructions on how to build ray from source on ARM. This was tested using Ubuntu 20.04 on an AWS Graviton (ARM64) instance.

Building Ray on ARM.

  1. Install the basic Ray dependencies.
sudo apt-get update
sudo apt-get install -y build-essential curl unzip psmisc
sudo apt-get install python3-dev python3-pip python-is-python3

pip install cython==0.29.0 pytest
  1. Install bazel. Bazel doesn't come with an ARM installer script, so our ci/travis/install-bazel.sh doesn't work.
mkdir -p ~/bin
wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-linux-arm64 -o ~/bin/bazel
chmod u+x ~/bin/bazel
echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc

wuisawesome avatar Jan 29 '21 02:01 wuisawesome

Hey @wuisawesome,

I think that you are outputting the output of wget to ~/bin/bazel instead of the binary itself.

Other than that. Have you managed to install ray on Graviton instances? I have building errors and I have no luck.

Thanks in advance. Javi

javimontero avatar Mar 10 '21 10:03 javimontero

Yes, I tested this when creating the issue. What issues are you running into?

wuisawesome avatar Mar 10 '21 20:03 wuisawesome

Worked perfectly for me, just one correction like the author of the previous comment already found out:

  1. Install Bazel:
mkdir -p ~/bin
wget https://github.com/bazelbuild/bazel/releases/download/3.7.2/bazel-3.7.2-linux-arm64 -O ~/bin/bazel  # captial -O
chmod u+x ~/bin/bazel
echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc
source ~/.bashrc
  1. Compile Ray:
cd ~/ray
./build.sh
  1. Build Python wheel (if that's why you are here):
cd ~/ray/python
python3 setup.py bdist_wheel

There it is in ~/ray/python/dist

nschrader avatar Jul 19 '21 10:07 nschrader

Duplicate of https://github.com/ray-project/ray/issues/12128 ?

ddelange avatar Mar 11 '22 10:03 ddelange

Hi, I'm a bot from the Ray team :)

To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.

If there is no further activity in the 14 days, the issue will be closed!

  • If you'd like to keep the issue open, just leave any comment, and the stale label will be removed!
  • If you'd like to get more attention to the issue, please tag one of Ray's contributors.

You can always ask for help on our discussion forum or Ray's public slack channel.

stale[bot] avatar Sep 24 '22 02:09 stale[bot]

@richardliaw what action should we take here?

mattip avatar Oct 20 '22 17:10 mattip

With cheap AWS Graviton instances with loads of memory this would be greatly appreciated.

dmarkey avatar Dec 29 '22 22:12 dmarkey

ray-2.2.0-cp310-cp310-linux_aarch64.zip

Here is an arm64 wheel for ubuntu 22.04 if anyone is looking for it (YMMV of course). You need to download and rename to ray-2.2.0-cp310-cp310-linux_aarch64.whl before installing with pip.

dmarkey avatar Jan 02 '23 00:01 dmarkey

We are now building wheels for every commit with #31522. We may pick this onto the latest release (2.2.0), alternatively it will be definitely included in the next release.

krfricke avatar Jan 09 '23 19:01 krfricke

This is awesome, thanks @krfricke ! Is there any chance of getting a PyPi release for 2.1 as well?

jppgks avatar Jan 10 '23 17:01 jppgks

I'll look into it - generally it should work as 2.1 also uses the new CI system.

krfricke avatar Jan 10 '23 19:01 krfricke

@jppgks Why can't you upgrade to 2.2? In general we don't backport features to old releases and encourage people to upgrade instead. If there is a blocker to upgrading, we really want to know :)

pcmoritz avatar Jan 10 '23 19:01 pcmoritz