Skip to content

Commit 2e513cc

Browse files
krfrickeAmeerHajAli
authored andcommitted
[ci] Build wheels for Linux ARM64 (#31522)
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 <[email protected]>
1 parent f5de840 commit 2e513cc

13 files changed

+188
-41
lines changed

.buildkite/pipeline.arm64.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
- label: ":mechanical_arm: :ferris_wheel: ARM64 Linux wheels"
2+
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
3+
instance_size: arm64-medium
4+
commands:
5+
# Build the wheels
6+
- UPLOAD_WHEELS_AS_ARTIFACTS=1 LINUX_WHEELS=1 ./ci/ci.sh build
7+
# Upload the wheels
8+
# We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
9+
- if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
10+
- pip install -q docker aws_requests_auth boto3
11+
- ./ci/env/env_info.sh
12+
# Upload to branch directory.
13+
- python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
14+
# Upload to latest directory.
15+
- if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi
16+
17+
- label: ":mechanical_arm: :ferris_wheel: ARM64 Post-wheels tests"
18+
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
19+
instance_size: arm64-medium
20+
commands:
21+
- LINUX_WHEELS=1 ./ci/ci.sh build
22+
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
23+
- ./ci/env/env_info.sh
24+
- bazel test --config=ci $(./ci/run/bazel_export_options)
25+
--test_tag_filters=post_wheel_build
26+
--test_env=CONDA_EXE
27+
--test_env=CONDA_PYTHON_EXE
28+
--test_env=CONDA_SHLVL
29+
--test_env=CONDA_PREFIX
30+
--test_env=CONDA_DEFAULT_ENV
31+
--test_env=CI
32+
--test_env=RAY_CI_POST_WHEEL_TESTS=True
33+
python/ray/tests/... python/ray/serve/... python/ray/tune/... rllib/... doc/...
34+
35+
36+
# This currently takes ~3 hours and times out often.
37+
# Enable this when ARM debug wheels are actually needed (and look into speeding this up).
38+
39+
#- label: ":mechanical_arm: :ferris_wheel: ARM64 Debug Wheels"
40+
# conditions:
41+
# [
42+
# "RAY_CI_LINUX_WHEELS_AFFECTED",
43+
# ]
44+
# instance_size: arm64-medium
45+
# commands:
46+
# # Build the debug wheels
47+
# - RAY_DEBUG_BUILD=debug LINUX_WHEELS=1 ./ci/ci.sh build
48+
# # Upload the wheels.
49+
# # We don't want to push on PRs, in fact, the copy_files will fail because unauthenticated.
50+
# - if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then exit 0; fi
51+
# - pip install -q docker aws_requests_auth boto3
52+
# - ./ci/env/env_info.sh
53+
# # Upload to branch directory.
54+
# - python .buildkite/copy_files.py --destination branch_wheels --path ./.whl
55+
# # Upload to latest directory.
56+
# - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi

.buildkite/pipeline.build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@
200200
instance_size: medium
201201
commands:
202202
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
203-
- bazel test --config=ci --config=ubsan $(./ci/run/bazel_export_options)
203+
# Unset CC CXX vars set in Dockerfile. Clang currently runs into problems with ubsan builds, this will revert to
204+
# using GCC instead.
205+
- unset CC CXX && bazel test --config=ci --config=ubsan $(./ci/run/bazel_export_options)
204206
--build_tests_only
205207
--jobs=2
206208
-- //:all -//:core_worker_test -//:logging_test -//:ray_syncer_test

ci/ci.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,14 @@ build_wheels() {
454454
-e "RAY_DEBUG_BUILD=${RAY_DEBUG_BUILD:-}"
455455
)
456456

457+
IMAGE_NAME="quay.io/pypa/manylinux2014_${HOSTTYPE}"
458+
IMAGE_TAG="2022-12-20-b4884d9"
459+
457460
if [ -z "${BUILDKITE-}" ]; then
458461
# This command should be kept in sync with ray/python/README-building-wheels.md,
459462
# except the "${MOUNT_BAZEL_CACHE[@]}" part.
460463
docker run --rm -w /ray -v "${PWD}":/ray "${MOUNT_BAZEL_CACHE[@]}" \
461-
quay.io/pypa/manylinux2014_x86_64:2022-12-20-b4884d9 /ray/python/build-wheel-manylinux2014.sh
464+
"${IMAGE_NAME}:${IMAGE_TAG}" /ray/python/build-wheel-manylinux2014.sh
462465
else
463466
rm -rf /ray-mount/*
464467
rm -rf /ray-mount/.whl || true
@@ -468,7 +471,7 @@ build_wheels() {
468471
docker run --rm -v /ray:/ray-mounted ubuntu:focal ls /
469472
docker run --rm -v /ray:/ray-mounted ubuntu:focal ls /ray-mounted
470473
docker run --rm -w /ray -v /ray:/ray "${MOUNT_BAZEL_CACHE[@]}" \
471-
quay.io/pypa/manylinux2014_x86_64:2022-12-20-b4884d9 /ray/python/build-wheel-manylinux2014.sh
474+
"${IMAGE_NAME}:${IMAGE_TAG}" /ray/python/build-wheel-manylinux2014.sh
472475
cp -rT /ray-mount /ray # copy new files back here
473476
find . | grep whl # testing
474477

ci/docker/base.test.Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM ubuntu:focal
1+
ARG DOCKER_IMAGE_BASE_UBUNTU=ubuntu:focal
2+
FROM $DOCKER_IMAGE_BASE_UBUNTU
23

34
ARG REMOTE_CACHE_URL
45
ARG BUILDKITE_PULL_REQUEST
@@ -33,6 +34,7 @@ RUN apt-get install -y -qq \
3334
sudo unzip unrar apt-utils dialog tzdata wget rsync \
3435
language-pack-en tmux cmake gdb vim htop \
3536
libgtk2.0-dev zlib1g-dev libgl1-mesa-dev \
37+
liblz4-dev libunwind-dev libncurses5 \
3638
clang-format-12 jq \
3739
clang-tidy-12 clang-12
3840
# Make using GCC 9 explicit.

ci/docker/build.Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ENV BUILDKITE_PULL_REQUEST=${BUILDKITE_PULL_REQUEST}
99
ENV BUILDKITE_COMMIT=${BUILDKITE_COMMIT}
1010
ENV BUILDKITE_PULL_REQUEST_BASE_BRANCH=${BUILDKITE_PULL_REQUEST_BASE_BRANCH}
1111
ENV TRAVIS_COMMIT=${BUILDKITE_COMMIT}
12+
# Set compiler here to build Ray with CLANG/LLVM
13+
ENV CC=clang
14+
ENV CXX=clang++-12
1215

1316
# Move out of working dir /ray
1417
# Delete stale data
@@ -25,9 +28,8 @@ RUN env
2528

2629
# init also calls install-dependencies.sh
2730
RUN BUILD=1 bash --login -i ./ci/ci.sh init
28-
RUN bash --login -i ./ci/ci.sh build
2931

30-
RUN export CC=clang CXX=clang++-12
32+
RUN bash --login -i ./ci/ci.sh build
3133

3234
# Run determine test to run
3335
RUN bash --login -i -c "python ./ci/pipeline/determine_tests_to_run.py --output=json > affected_set.json"

ci/env/install-bazel.sh

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ROOT_DIR=$(cd "$(dirname "$0")/$(dirname "$(test -L "$0" && readlink "$0" || ech
55

66
arg1="${1-}"
77

8-
achitecture="${HOSTTYPE}"
8+
99
platform="unknown"
1010
case "${OSTYPE}" in
1111
msys)
@@ -26,6 +26,9 @@ case "${OSTYPE}" in
2626
exit 1
2727
esac
2828

29+
architecture="${HOSTTYPE}"
30+
echo "Architecture is $architecture"
31+
2932
if [ "${BAZEL_CONFIG_ONLY-}" != "1" ]; then
3033
# Sanity check: Verify we have symlinks where we expect them, or Bazel can produce weird "missing input file" errors.
3134
# This is most likely to occur on Windows, where symlinks are sometimes disabled by default.
@@ -50,26 +53,57 @@ if [ "${BAZEL_CONFIG_ONLY-}" != "1" ]; then
5053
if [ "${OSTYPE}" = "msys" ]; then
5154
target="${MINGW_DIR-/usr}/bin/bazel.exe"
5255
mkdir -p "${target%/*}"
53-
curl -f -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-${achitecture}.exe"
56+
curl -f -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-${architecture}.exe"
5457
else
55-
target="./install.sh"
56-
curl -f -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-installer-${platform}-${achitecture}.sh"
57-
chmod +x "${target}"
58+
59+
# Buildkite mac instances
5860
if [[ -n "${BUILDKITE-}" ]] && [ "${platform}" = "darwin" ]; then
59-
"${target}" --user
61+
mkdir -p "$HOME/bin"
6062
# Add bazel to the path.
6163
# shellcheck disable=SC2016
6264
printf '\nexport PATH="$HOME/bin:$PATH"\n' >> ~/.zshenv
6365
# shellcheck disable=SC1090
6466
source ~/.zshenv
67+
INSTALL_USER=1
68+
# Buildkite linux instance
6569
elif [ "${CI-}" = true ] || [ "${arg1-}" = "--system" ]; then
66-
"$(command -v sudo || echo command)" "${target}" > /dev/null # system-wide install for CI
70+
INSTALL_USER=0
71+
# User
6772
else
68-
"${target}" --user > /dev/null
73+
mkdir -p "$HOME/bin"
74+
INSTALL_USER=1
6975
export PATH=$PATH:"$HOME/bin"
7076
fi
71-
which bazel
72-
rm -f "${target}"
77+
78+
if [ "${architecture}" = "aarch64" ]; then
79+
# architecture is "aarch64", but the bazel tag is "arm64"
80+
url="https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-${platform}-arm64"
81+
82+
if [ "$INSTALL_USER" = "1" ]; then
83+
target="$HOME/bin/bazel"
84+
curl -f -s -L -R -o "${target}" "${url}"
85+
chmod +x "${target}"
86+
else
87+
target="/bin/bazel"
88+
sudo curl -f -s -L -R -o "${target}" "${url}"
89+
sudo chmod +x "${target}"
90+
fi
91+
92+
which bazel
93+
94+
else
95+
target="./install.sh"
96+
curl -f -s -L -R -o "${target}" "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-installer-${platform}-${architecture}.sh"
97+
chmod +x "${target}"
98+
99+
if [ "$INSTALL_USER" = "1" ]; then
100+
"${target}" --user
101+
else
102+
"$(command -v sudo || echo command)" "${target}" > /dev/null # system-wide install for CI
103+
fi
104+
which bazel
105+
rm -f "${target}"
106+
fi
73107
fi
74108
fi
75109

ci/env/install-dependencies.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,15 @@ download_mnist() {
287287
install_pip_packages() {
288288

289289
# Install modules needed in all jobs.
290+
# shellcheck disable=SC2262
290291
alias pip="python -m pip"
291292

292293
if [ "${MINIMAL_INSTALL-}" != 1 ]; then
294+
# Some architectures will build dm-tree from source.
295+
# Move bazelrc to a different location temporarily to disable --config=ci settings
296+
mv "$HOME/.bazelrc" "$HOME/._brc" || true
293297
pip install --no-clean dm-tree==0.1.5 # --no-clean is due to: https://github.com/deepmind/tree/issues/5
298+
mv "$HOME/._brc" "$HOME/.bazelrc" || true
294299
fi
295300

296301
if { [ -n "${PYTHON-}" ] || [ "${DL-}" = "1" ]; } && [ "${MINIMAL_INSTALL-}" != 1 ]; then

ci/env/install-llvm-binaries.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ log_err() {
2525

2626
trap '[ $? -eq 0 ] || log_err' EXIT
2727

28-
LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz"
28+
FILE_NAME="clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz"
29+
30+
if [ "$HOSTTYPE" = "aarch64" ]; then
31+
FILE_NAME="clang+llvm-12.0.1-aarch64-linux-gnu.tar.xz "
32+
fi
33+
34+
LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/${FILE_NAME}"
35+
2936
TARGET_DIR="/opt/llvm"
3037

3138
install_llvm() {
@@ -67,7 +74,7 @@ install_llvm() {
6774
WGET_OPTIONS="-nv"
6875
fi
6976

70-
wget ${WGET_OPTIONS} -c $url -O llvm.tar.xz
77+
wget ${WGET_OPTIONS} -c "$url" -O llvm.tar.xz
7178

7279
printInfo "Installing LLVM to ${targetdir}"
7380
mkdir -p "${targetdir}"

doc/source/ray-overview/installation.rst

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Installing Ray
44
==============
55

6-
Ray currently officially supports x86_64 and Apple silicon (M1) hardware.
6+
Ray currently officially supports x86_64, aarch64 (ARM) for Linux, and Apple silicon (M1) hardware.
77
Ray on Windows is currently in beta.
88

99
Official Releases
@@ -49,16 +49,16 @@ You can install the nightly Ray wheels via the following links. These daily rele
4949
# pip install -U LINK_TO_WHEEL.whl
5050
5151
52-
=================================== ==================== =======================
53-
Linux MacOS Windows (beta)
54-
=================================== ==================== =======================
55-
`Linux Python 3.10`_ `MacOS Python 3.10`_ `Windows Python 3.10`_
56-
`Linux Python 3.9`_ `MacOS Python 3.9`_ `Windows Python 3.9`_
57-
`Linux Python 3.8`_ `MacOS Python 3.8`_ `Windows Python 3.8`_
58-
`Linux Python 3.7`_ `MacOS Python 3.7`_ `Windows Python 3.7`_
59-
`Linux Python 3.6`_ `MacOS Python 3.6`_
60-
`Linux Python 3.11 (EXPERIMENTAL)`_
61-
=================================== ==================== =======================
52+
=============================================== ================================================ ==================== =======================
53+
Linux (x86_64) Linux (arm64/aarch64) MacOS Windows (beta)
54+
=============================================== ================================================ ==================== =======================
55+
`Linux Python 3.10 (x86_64)`_ `Linux Python 3.10 (aarch64)`_ `MacOS Python 3.10`_ `Windows Python 3.10`_
56+
`Linux Python 3.9 (x86_64)`_ `Linux Python 3.9 (aarch64)`_ `MacOS Python 3.9`_ `Windows Python 3.9`_
57+
`Linux Python 3.8 (x86_64)`_ `Linux Python 3.8 (aarch64)`_ `MacOS Python 3.8`_ `Windows Python 3.8`_
58+
`Linux Python 3.7 (x86_64)`_ `Linux Python 3.7 (aarch64)`_ `MacOS Python 3.7`_ `Windows Python 3.7`_
59+
`Linux Python 3.6 (x86_64)`_ `Linux Python 3.6 (aarch64)`_ `MacOS Python 3.6`_
60+
`Linux Python 3.11 (x86_64) (EXPERIMENTAL)`_ `Linux Python 3.11 (aarch64) (EXPERIMENTAL)`_
61+
=============================================== ================================================ ==================== =======================
6262

6363
.. note::
6464

@@ -73,12 +73,20 @@ You can install the nightly Ray wheels via the following links. These daily rele
7373

7474
Python 3.11 support is experimental.
7575

76-
.. _`Linux Python 3.11 (EXPERIMENTAL)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp311-cp311-manylinux2014_x86_64.whl
77-
.. _`Linux Python 3.10`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
78-
.. _`Linux Python 3.9`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
79-
.. _`Linux Python 3.8`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
80-
.. _`Linux Python 3.7`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
81-
.. _`Linux Python 3.6`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp36-cp36m-manylinux2014_x86_64.whl
76+
.. _`Linux Python 3.11 (x86_64) (EXPERIMENTAL)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp311-cp311-manylinux2014_x86_64.whl
77+
.. _`Linux Python 3.10 (x86_64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_x86_64.whl
78+
.. _`Linux Python 3.9 (x86_64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl
79+
.. _`Linux Python 3.8 (x86_64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
80+
.. _`Linux Python 3.7 (x86_64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_x86_64.whl
81+
.. _`Linux Python 3.6 (x86_64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp36-cp36m-manylinux2014_x86_64.whl
82+
83+
.. _`Linux Python 3.11 (aarch64) (EXPERIMENTAL)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp311-cp311-manylinux2014_aarch64.whl
84+
.. _`Linux Python 3.10 (aarch64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-manylinux2014_aarch64.whl
85+
.. _`Linux Python 3.9 (aarch64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_aarch64.whl
86+
.. _`Linux Python 3.8 (aarch64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp38-cp38-manylinux2014_aarch64.whl
87+
.. _`Linux Python 3.7 (aarch64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp37-cp37m-manylinux2014_aarch64.whl
88+
.. _`Linux Python 3.6 (aarch64)`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp36-cp36m-manylinux2014_aarch64.whl
89+
8290

8391
.. _`MacOS Python 3.10`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp310-cp310-macosx_10_15_universal2.whl
8492
.. _`MacOS Python 3.9`: https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-macosx_10_15_x86_64.whl

python/build-wheel-manylinux2014.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ NUMPY_VERSIONS=("1.14.5"
2929
yum -y install unzip zip sudo
3030
yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel xz
3131
yum -y install openssl
32-
yum install libasan-4.8.5-44.el7.x86_64 -y
33-
yum install libubsan-7.3.1-5.10.el7.x86_64 -y
34-
yum install devtoolset-8-libasan-devel.x86_64 -y
35-
3632

33+
if [ "${HOSTTYPE-}" = "x86_64" ]; then
34+
yum install "libasan-4.8.5-44.el7.${HOSTTYPE}" -y
35+
yum install "libubsan-7.3.1-5.10.el7.${HOSTTYPE}" -y
36+
yum install "devtoolset-8-libasan-devel.${HOSTTYPE}" -y
37+
fi
3738

3839
java -version
3940
java_bin=$(readlink -f "$(command -v java)")

python/ray/_private/utils.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import logging
1111
import multiprocessing
1212
import os
13+
import platform
1314
import re
1415
import signal
1516
import subprocess
@@ -1249,6 +1250,7 @@ def get_wheel_filename(
12491250
sys_platform: str = sys.platform,
12501251
ray_version: str = ray.__version__,
12511252
py_version: Tuple[int, int] = (sys.version_info.major, sys.version_info.minor),
1253+
architecture: Optional[str] = None,
12521254
) -> str:
12531255
"""Returns the filename used for the nightly Ray wheel.
12541256
@@ -1259,6 +1261,9 @@ def get_wheel_filename(
12591261
`ray --version`. Examples: "3.0.0.dev0"
12601262
py_version: The Python version as returned by sys.version_info. A
12611263
tuple of (major, minor). Examples: (3, 8)
1264+
architecture: Architecture, e.g. ``x86_64`` or ``aarch64``. If None, will
1265+
be determined by calling ``platform.processor()``.
1266+
12621267
Returns:
12631268
The wheel file name. Examples:
12641269
ray-3.0.0.dev0-cp38-cp38-manylinux2014_x86_64.whl
@@ -1272,9 +1277,17 @@ def get_wheel_filename(
12721277
darwin_os_string = "macosx_10_15_x86_64"
12731278
else:
12741279
darwin_os_string = "macosx_10_15_universal2"
1280+
1281+
architecture = architecture or platform.processor()
1282+
1283+
if architecture == "aarch64":
1284+
linux_os_string = "manylinux2014_aarch64"
1285+
else:
1286+
linux_os_string = "manylinux2014_x86_64"
1287+
12751288
os_strings = {
12761289
"darwin": darwin_os_string,
1277-
"linux": "manylinux2014_x86_64",
1290+
"linux": linux_os_string,
12781291
"win32": "win_amd64",
12791292
}
12801293

python/ray/tests/test_runtime_env_complicated.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import platform
23
from pathlib import Path
34
import pytest
45
import subprocess
@@ -777,6 +778,12 @@ def get(self):
777778
os.environ.get("CI") and sys.platform != "linux",
778779
reason="This test is only run on linux CI machines.",
779780
)
781+
# Skip on Linux ARM64 as the test times out. This is probably because some
782+
# dependencies may not be available for arm64 and must be compiled from source.
783+
@pytest.mark.skipif(
784+
sys.platform == "linux" and platform.processor() == "aarch64",
785+
reason="This test is currently not supported on Linux ARM64",
786+
)
780787
@pytest.mark.parametrize(
781788
"call_ray_start",
782789
[f"ray start --head --ray-client-server-port {CLIENT_SERVER_PORT} --port 0"],

0 commit comments

Comments
 (0)