From 1a1cd263994a7dfc8b90a37c6a32f5191e23c9b6 Mon Sep 17 00:00:00 2001 From: can Date: Thu, 8 Jun 2023 20:40:25 +0000 Subject: [PATCH] Support docker build for 3.11 Signed-off-by: can --- .buildkite/pipeline.build.yml | 4 +++- ci/build/build-docker-images.py | 1 + docker/base-deps/Dockerfile | 20 ++++++++++++-------- docker/retag-lambda/python_versions.txt | 1 + 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.buildkite/pipeline.build.yml b/.buildkite/pipeline.build.yml index 1f30039f5a4c..0f8dbcb26be0 100644 --- a/.buildkite/pipeline.build.yml +++ b/.buildkite/pipeline.build.yml @@ -64,7 +64,7 @@ # Upload to latest directory. - if [ "$BUILDKITE_BRANCH" == "master" ]; then python .buildkite/copy_files.py --destination wheels --path ./.whl; fi -- label: ":docker: Build Images: py37 (1/2)" +- label: ":docker: Build Images: {{matrix}} - cpu/cu115/116" conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"] instance_size: medium commands: @@ -78,6 +78,7 @@ - py38 - py39 - py310 + - py311 - label: ":docker: Build Images: {{matrix}} - cu117/cu118" conditions: ["RAY_CI_PYTHON_DEPENDENCIES_AFFECTED", "RAY_CI_DOCKER_AFFECTED", "RAY_CI_CORE_CPP_AFFECTED"] @@ -93,6 +94,7 @@ - py38 - py39 - py310 + - py311 - label: ":java: Java" conditions: ["RAY_CI_JAVA_AFFECTED"] diff --git a/ci/build/build-docker-images.py b/ci/build/build-docker-images.py index 0825caac3e44..b79f1ee7fff2 100644 --- a/ci/build/build-docker-images.py +++ b/ci/build/build-docker-images.py @@ -42,6 +42,7 @@ "py38": "3.8", "py39": "3.9", "py310": "3.10", + "py311": "3.11", } # Versions for which we build the ray-ml image diff --git a/docker/base-deps/Dockerfile b/docker/base-deps/Dockerfile index 99b8acf785e7..e4e4da0be661 100644 --- a/docker/base-deps/Dockerfile +++ b/docker/base-deps/Dockerfile @@ -12,7 +12,6 @@ ENV TZ=America/Los_Angeles ENV PATH "/home/ray/anaconda3/bin:$PATH" ARG DEBIAN_FRONTEND=noninteractive ARG PYTHON_VERSION=3.8.16 - ARG HOSTTYPE=${HOSTTYPE:-x86_64} ARG RAY_UID=1000 @@ -28,7 +27,6 @@ RUN apt-get update -y \ USER $RAY_UID ENV HOME=/home/ray - # Todo (krfricke): Move to latest miniconda version once we stop building # images for Python 3.7. # https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${HOSTTYPE}.sh @@ -48,16 +46,22 @@ RUN sudo apt-get update -y && sudo apt-get upgrade -y \ netbase \ openssh-client \ gnupg; fi) \ - && wget \ - --quiet "https://repo.anaconda.com/miniconda/Miniconda3-py37_23.1.0-1-Linux-${HOSTTYPE}.sh" \ + && if [ "$PYTHON_VERSION" = "3.11" ]; then \ + MINICONDA_VERSION="py310_23.3.1-0"; \ + LIBGCC="libgcc-ng"; \ + else \ + MINICONDA_VERSION="py37_23.1.0-1"; \ + # TODO (can): Remove libffi=3.3 once #33299 is resolved + LIBGCC="libgcc-ng libffi=3.3"; \ + fi \ + && wget --quiet \ + "https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-${HOSTTYPE}.sh" \ -O /tmp/miniconda.sh \ && /bin/bash /tmp/miniconda.sh -b -u -p $HOME/anaconda3 \ && $HOME/anaconda3/bin/conda init \ && echo 'export PATH=$HOME/anaconda3/bin:$PATH' >> /home/ray/.bashrc \ - && rm /tmp/miniconda.sh \ - && $HOME/anaconda3/bin/conda install -y \ - # remove libffi pinning when fixed upstream #33299 - libgcc-ng libffi=3.3 python=$PYTHON_VERSION \ + && rm /tmp/miniconda.sh \ + && $HOME/anaconda3/bin/conda install -y $LIBGCC python=$PYTHON_VERSION \ && $HOME/anaconda3/bin/conda clean -y --all \ && $HOME/anaconda3/bin/pip install --no-cache-dir \ flatbuffers \ diff --git a/docker/retag-lambda/python_versions.txt b/docker/retag-lambda/python_versions.txt index 8d4b09f3bd1d..f7ed4ea62206 100644 --- a/docker/retag-lambda/python_versions.txt +++ b/docker/retag-lambda/python_versions.txt @@ -2,3 +2,4 @@ py37 py38 py39 py310 +py311