I used a EC2 A1 instance (a1.2xlarge) with Ubuntu 20.04 (arm64)
$ lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
$ sudo apt install python3-pip python-dev build-essential curl unzip wget pkg-config -y
$ bazel_version=5.3.1
$ wget https://github.com/bazelbuild/bazel/releases/download/${bazel_version}/bazel-${bazel_version}-linux-arm64
$ mkdir -p ~/.bazel/bin && mv bazel-5.3.1-linux-arm64 ~/.bazel/bin/bazel && chmod +x ~/.bazel/bin/bazel
$ sudo ln -s ~/.bazel/bin/bazel /usr/local/bin/bazel
Enable fastbuild by adding this to ~/.bazelrc
:
build --compilation_mode=fastbuild
Otherwise, the build process will spend long time optimizing the build.
Clone ray
$ git clone --branch ray-2.0.0 --depth 1 https://github.com/ray-project/ray.git
Build wheel
$ cd ray/python
$ python3 setup.py bdist_wheel
We may also want to disable build_cpp
in setup.py
to reduce the build time.
The built wheel will be under dist
directory:
~/ray/python$ ls dist
ray-2.0.0-cp38-cp38-linux_aarch64.whl