From f459343d243bd3443d19ece3c42d5964a7674e35 Mon Sep 17 00:00:00 2001 From: Kanglan Tang Date: Thu, 31 Jul 2025 17:24:19 -0700 Subject: [PATCH] Upgrade python 3.14.0rc1 and install python 3.14-nogil in linux docker images PiperOrigin-RevId: 789527645 --- ci/official/containers/ml_build/Dockerfile | 1 + .../containers/ml_build/setup.python.sh | 25 +++---------------- .../containers/ml_build_arm64/Dockerfile | 1 + .../containers/ml_build_arm64/setup.python.sh | 19 +++----------- 4 files changed, 9 insertions(+), 37 deletions(-) diff --git a/ci/official/containers/ml_build/Dockerfile b/ci/official/containers/ml_build/Dockerfile index 9aa72bedb45..e19fa463188 100644 --- a/ci/official/containers/ml_build/Dockerfile +++ b/ci/official/containers/ml_build/Dockerfile @@ -29,6 +29,7 @@ RUN /setup.python.sh python3.11 /builder.requirements.txt RUN /setup.python.sh python3.13 /builder.requirements.txt RUN /setup.python.sh python3.13-nogil /builder.requirements.txt RUN /setup.python.sh python3.14 /builder.requirements.txt +RUN /setup.python.sh python3.14-nogil /builder.requirements.txt # Since we are using python3.12 as the default python version, we need to # install python3.12 last for now. diff --git a/ci/official/containers/ml_build/setup.python.sh b/ci/official/containers/ml_build/setup.python.sh index bdcc572caec..cd56f3ca552 100755 --- a/ci/official/containers/ml_build/setup.python.sh +++ b/ci/official/containers/ml_build/setup.python.sh @@ -24,7 +24,7 @@ VERSION=$1 REQUIREMENTS=$2 # Install Python packages for this container's version -if [[ ${VERSION} == "python3.13-nogil" ]]; then +if [[ ${VERSION} == "python3.13-nogil" || ${VERSION} == "python3.14-nogil" ]]; then cat >pythons.txt < requirements_without_twine.txt REQUIREMENTS=requirements_without_twine.txt fi diff --git a/ci/official/containers/ml_build_arm64/Dockerfile b/ci/official/containers/ml_build_arm64/Dockerfile index f626ac031cc..379162d0d1a 100644 --- a/ci/official/containers/ml_build_arm64/Dockerfile +++ b/ci/official/containers/ml_build_arm64/Dockerfile @@ -67,6 +67,7 @@ RUN /setup.python.sh python3.13 requirements.txt # python3.13-nogil is a free-threaded build of python3.13. RUN /setup.python.sh python3.13-nogil requirements.txt RUN /setup.python.sh python3.14 requirements.txt +RUN /setup.python.sh python3.14-nogil requirements.txt # Python commands by default run under 3.11 RUN ln -sf /usr/bin/python3.11 /usr/bin/python3 diff --git a/ci/official/containers/ml_build_arm64/setup.python.sh b/ci/official/containers/ml_build_arm64/setup.python.sh index 34a1deeaa0d..978a2cd8e99 100755 --- a/ci/official/containers/ml_build_arm64/setup.python.sh +++ b/ci/official/containers/ml_build_arm64/setup.python.sh @@ -25,7 +25,7 @@ REQUIREMENTS=$2 add-apt-repository ppa:deadsnakes/ppa # Install Python packages for this container's version -if [[ ${VERSION} == "python3.13-nogil" ]]; then +if [[ ${VERSION} == "python3.13-nogil" || ${VERSION} == "python3.14-nogil" ]]; then cat >pythons.txt < requirements_without_twine.txt REQUIREMENTS=requirements_without_twine.txt fi