Skip to content

Commit

Permalink
Support docker build for 3.11
Browse files Browse the repository at this point in the history
Signed-off-by: can <can@anyscale.com>
  • Loading branch information
can-anyscale committed Jun 22, 2023
1 parent 8e45d2d commit f3b5051
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .buildkite/pipeline.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -93,6 +94,7 @@
- py38
- py39
- py310
- py311

- label: ":java: Java"
conditions: ["RAY_CI_JAVA_AFFECTED"]
Expand Down
1 change: 1 addition & 0 deletions ci/build/build-docker-images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 13 additions & 8 deletions docker/base-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,11 +27,11 @@ 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

SHELL ["/bin/bash", "-c"]
RUN sudo apt-get update -y && sudo apt-get upgrade -y \
&& sudo apt-get install -y \
git \
Expand All @@ -48,16 +47,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" || "${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 \
Expand Down
1 change: 1 addition & 0 deletions docker/retag-lambda/python_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ py37
py38
py39
py310
py311

0 comments on commit f3b5051

Please sign in to comment.