Skip to content

Commit

Permalink
[python3.10] Build py310 images (ray-project#24859)
Browse files Browse the repository at this point in the history
Build python 3.10 images so we can run release tests.
  • Loading branch information
scv119 committed May 18, 2022
1 parent c3d54de commit 1325cf7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@
- 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 cu110 cu111 cu112 --build-type BUILDKITE --build-base

- label: ":docker: Build Images: py310"
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 cpu --build-type BUILDKITE --build-base

- label: ":book: Lint"
commands:
- export LINT=1
Expand Down
18 changes: 12 additions & 6 deletions ci/build/build-docker-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
"ray-worker-container": "Internal Image for CI test",
}

PY_MATRIX = {"py36": "3.6.12", "py37": "3.7.7", "py38": "3.8.5", "py39": "3.9.5"}
PY_MATRIX = {
"py36": "3.6.12",
"py37": "3.7.7",
"py38": "3.8.5",
"py39": "3.9.5",
"py310": "3.10.4",
}

BASE_IMAGES = {
"cu112": "nvidia/cuda:11.2.0-cudnn8-devel-ubuntu18.04",
Expand Down Expand Up @@ -182,15 +188,15 @@ def _build_docker_image(
)

# TODO(https://github.com/ray-project/ray/issues/16599):
# remove below after supporting ray-ml images with Python 3.9
if image_name == "ray-ml" and py_version == "py39":
print(f"{image_name} image is currently unsupported with " "Python 3.9")
# remove below after supporting ray-ml images with Python 3.9+
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")
return

build_args = {}
build_args["PYTHON_VERSION"] = PY_MATRIX[py_version]
# I.e. "py36"[-1] == 6
build_args["PYTHON_MINOR_VERSION"] = py_version[-1]
# I.e. "py310"[3:] == 10
build_args["PYTHON_MINOR_VERSION"] = py_version[3:]

device_tag = f"{image_type}"

Expand Down
1 change: 1 addition & 0 deletions docker/base-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@ RUN sudo apt-get update -y && sudo apt-get upgrade -y \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt-get clean


WORKDIR $HOME
3 changes: 2 additions & 1 deletion docker/retag-lambda/python_versions.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
py36
py37
py38
py39
py39
py310

0 comments on commit 1325cf7

Please sign in to comment.