mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
Add support for Python 3.10 (#21221)
Signed-off-by: acxz <17132214+acxz@users.noreply.github.com>
This commit is contained in:
parent
455fa664e5
commit
96d579a4fe
7 changed files with 29 additions and 11 deletions
|
@ -147,14 +147,22 @@
|
||||||
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
|
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
|
||||||
- python ./ci/build/build-docker-images.py --py-versions py39 --device-types cu111 cu112 cu113 cu116 --build-type BUILDKITE --build-base
|
- python ./ci/build/build-docker-images.py --py-versions py39 --device-types cu111 cu112 cu113 cu116 --build-type BUILDKITE --build-base
|
||||||
|
|
||||||
- label: ":docker: Build Images: py310"
|
- label: ":docker: Build Images: py310 (1/2)"
|
||||||
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
|
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
|
||||||
commands:
|
commands:
|
||||||
- LINUX_WHEELS=1 ./ci/ci.sh build
|
- LINUX_WHEELS=1 ./ci/ci.sh build
|
||||||
- pip install -q docker aws_requests_auth boto3
|
- pip install -q docker aws_requests_auth boto3
|
||||||
- ./ci/env/env_info.sh
|
- ./ci/env/env_info.sh
|
||||||
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
|
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
|
||||||
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu --build-type BUILDKITE --build-base
|
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
|
||||||
|
|
||||||
|
- label: ":docker: Build Images: py310 (2/2)"
|
||||||
|
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
|
||||||
|
commands:
|
||||||
|
- LINUX_WHEELS=1 ./ci/ci.sh build
|
||||||
|
- pip install -q docker aws_requests_auth boto3
|
||||||
|
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
|
||||||
|
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cu110 cu111 cu112 --build-type BUILDKITE --build-base
|
||||||
|
|
||||||
- label: ":book: Lint"
|
- label: ":book: Lint"
|
||||||
commands:
|
commands:
|
||||||
|
@ -316,6 +324,12 @@
|
||||||
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
|
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
|
||||||
- ./ci/ci.sh test_minimal 3.9
|
- ./ci/ci.sh test_minimal 3.9
|
||||||
|
|
||||||
|
- label: ":python: Minimal install 3.10"
|
||||||
|
conditions: ["RAY_CI_PYTHON_AFFECTED"]
|
||||||
|
commands:
|
||||||
|
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
|
||||||
|
- ./ci/ci.sh test_minimal 3.10
|
||||||
|
|
||||||
- label: ":python: Default install"
|
- label: ":python: Default install"
|
||||||
conditions: ["RAY_CI_PYTHON_AFFECTED"]
|
conditions: ["RAY_CI_PYTHON_AFFECTED"]
|
||||||
commands:
|
commands:
|
||||||
|
|
|
@ -192,7 +192,7 @@ def _build_docker_image(
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(https://github.com/ray-project/ray/issues/16599):
|
# TODO(https://github.com/ray-project/ray/issues/16599):
|
||||||
# remove below after supporting ray-ml images with Python 3.9+
|
# remove below after supporting ray-ml images with Python 3.9/3.10
|
||||||
if image_name == "ray-ml" and py_version in {"py39", "py310"}:
|
if image_name == "ray-ml" and py_version in {"py39", "py310"}:
|
||||||
print(f"{image_name} image is currently unsupported with " "Python 3.9/3.10")
|
print(f"{image_name} image is currently unsupported with " "Python 3.9/3.10")
|
||||||
return
|
return
|
||||||
|
@ -453,7 +453,7 @@ def push_and_tag_images(
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# TODO(https://github.com/ray-project/ray/issues/16599):
|
# TODO(https://github.com/ray-project/ray/issues/16599):
|
||||||
# remove below after supporting ray-ml images with Python 3.9
|
# remove below after supporting ray-ml images with Python 3.9/3.10
|
||||||
if image_name in ["ray-ml"] and (
|
if image_name in ["ray-ml"] and (
|
||||||
PY_MATRIX[py_name].startswith("3.9")
|
PY_MATRIX[py_name].startswith("3.9")
|
||||||
or PY_MATRIX[py_name].startswith("3.10")
|
or PY_MATRIX[py_name].startswith("3.10")
|
||||||
|
@ -607,7 +607,8 @@ if __name__ == "__main__":
|
||||||
choices=list(PY_MATRIX.keys()),
|
choices=list(PY_MATRIX.keys()),
|
||||||
default="py37",
|
default="py37",
|
||||||
nargs="*",
|
nargs="*",
|
||||||
help="Which python versions to build. " "Must be in (py36, py37, py38, py39)",
|
help="Which python versions to build. "
|
||||||
|
"Must be in (py36, py37, py38, py39, py310)",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--device-types",
|
"--device-types",
|
||||||
|
|
|
@ -87,7 +87,7 @@ if [[ "$platform" == "linux" ]]; then
|
||||||
|
|
||||||
# Check that the other wheels are present.
|
# Check that the other wheels are present.
|
||||||
NUMBER_OF_WHEELS="$(find "$ROOT_DIR"/../../.whl/ -mindepth 1 -maxdepth 1 -name "*.whl" | wc -l)"
|
NUMBER_OF_WHEELS="$(find "$ROOT_DIR"/../../.whl/ -mindepth 1 -maxdepth 1 -name "*.whl" | wc -l)"
|
||||||
if [[ "$NUMBER_OF_WHEELS" != "4" ]]; then
|
if [[ "$NUMBER_OF_WHEELS" != "5" ]]; then
|
||||||
echo "Wrong number of wheels found."
|
echo "Wrong number of wheels found."
|
||||||
ls -l "$ROOT_DIR/../.whl/"
|
ls -l "$ROOT_DIR/../.whl/"
|
||||||
exit 2
|
exit 2
|
||||||
|
@ -95,11 +95,12 @@ if [[ "$platform" == "linux" ]]; then
|
||||||
|
|
||||||
elif [[ "$platform" == "macosx" ]]; then
|
elif [[ "$platform" == "macosx" ]]; then
|
||||||
MACPYTHON_PY_PREFIX=/Library/Frameworks/Python.framework/Versions
|
MACPYTHON_PY_PREFIX=/Library/Frameworks/Python.framework/Versions
|
||||||
PY_WHEEL_VERSIONS=("36" "37" "38" "39")
|
PY_WHEEL_VERSIONS=("36" "37" "38" "39" "310")
|
||||||
PY_MMS=("3.6"
|
PY_MMS=("3.6"
|
||||||
"3.7"
|
"3.7"
|
||||||
"3.8"
|
"3.8"
|
||||||
"3.9")
|
"3.9"
|
||||||
|
"3.10")
|
||||||
|
|
||||||
for ((i=0; i<${#PY_MMS[@]}; ++i)); do
|
for ((i=0; i<${#PY_MMS[@]}; ++i)); do
|
||||||
PY_MM="${PY_MMS[i]}"
|
PY_MM="${PY_MMS[i]}"
|
||||||
|
|
2
ci/env/install-minimal.sh
vendored
2
ci/env/install-minimal.sh
vendored
|
@ -12,6 +12,8 @@ else
|
||||||
PYTHON_VERSION=${PYTHON-3.8}
|
PYTHON_VERSION=${PYTHON-3.8}
|
||||||
elif [ "$1" = "3.9" ]; then
|
elif [ "$1" = "3.9" ]; then
|
||||||
PYTHON_VERSION=${PYTHON-3.9}
|
PYTHON_VERSION=${PYTHON-3.9}
|
||||||
|
elif [ "$1" = "3.10" ]; then
|
||||||
|
PYTHON_VERSION=${PYTHON-3.10}
|
||||||
else
|
else
|
||||||
echo "Unsupported Python version."
|
echo "Unsupported Python version."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -58,7 +58,7 @@ You can install the nightly Ray wheels via the following links. These daily rele
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Python 3.10 support is currently experimental.
|
Python 3.9/3.10 support is currently experimental.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
|
@ -36,4 +36,4 @@ lambda invoke --function-name DockerTagLatest \
|
||||||
--cli-read-timeout 600 \
|
--cli-read-timeout 600 \
|
||||||
--payload "{\"source_tag\" : \"$IMAGE\", \"destination_tag\" : \"latest\"}" /dev/stdout
|
--payload "{\"source_tag\" : \"$IMAGE\", \"destination_tag\" : \"latest\"}" /dev/stdout
|
||||||
|
|
||||||
echo -e "Please check logs before rerunning!!!!\n\nAt the time of writing, Autoscaler Images are not built & Ray-ML Images are not built for Py39\nSo retagging errors for those images are expected!"
|
echo -e "Please check logs before rerunning!!!!\n\nAt the time of writing, Autoscaler Images are not built & Ray-ML Images are not built for Py39/Py310\nSo retagging errors for those images are expected!"
|
||||||
|
|
Loading…
Add table
Reference in a new issue