diff --git a/.github/workflows/sigbuild-docker-branch.yml b/.github/workflows/sigbuild-docker-branch.yml index 108fe471efa2db..9f842f9fb27c11 100644 --- a/.github/workflows/sigbuild-docker-branch.yml +++ b/.github/workflows/sigbuild-docker-branch.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [python3.9, python3.10, python3.11] + python-version: [python3.9, python3.10, python3.11, python3.12] steps: - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache diff --git a/.github/workflows/sigbuild-docker-presubmit.yml b/.github/workflows/sigbuild-docker-presubmit.yml index c61e65e7d834c0..03ae6f1dadf63f 100644 --- a/.github/workflows/sigbuild-docker-presubmit.yml +++ b/.github/workflows/sigbuild-docker-presubmit.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [python3.9, python3.10, python3.11] + python-version: [python3.9, python3.10, python3.11, python3.12] permissions: contents: read pull-requests: write @@ -87,6 +87,7 @@ jobs: message: | I pushed these containers: + - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.12` - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.11` - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.10` - `gcr.io/tensorflow-sigs/build:${{ github.event.number }}-python3.9` diff --git a/.github/workflows/sigbuild-docker.yml b/.github/workflows/sigbuild-docker.yml index ce9b99c494fc5e..5549f2995ac80f 100644 --- a/.github/workflows/sigbuild-docker.yml +++ b/.github/workflows/sigbuild-docker.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [python3.9, python3.10, python3.11] + python-version: [python3.9, python3.10, python3.11, python3.12] steps: - name: Delete unnecessary tools folder run: rm -rf /opt/hostedtoolcache diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt index e9a79b120b5672..da3ea7d765f113 100644 --- a/tensorflow/tools/ci_build/release/requirements_common.txt +++ b/tensorflow/tools/ci_build/release/requirements_common.txt @@ -5,18 +5,19 @@ absl-py ~= 1.0.0 astunparse ~= 1.6.3 flatbuffers ~= 23.5.26 google_pasta ~= 0.2 -h5py ~= 3.8.0 # Earliest version for Python 3.11 -ml_dtypes ~= 0.2 +h5py ~= 3.10.0 # Earliest version for Python 3.12 +ml_dtypes ~= 0.3.1 # TODO(b/262592253): Support older versions of NumPy for Python 3.10 and lower # to support TFX. Remove when Apache Beam upgrades to newer NumPy. numpy ~= 1.22.0; python_version < '3.11' -numpy ~= 1.23.2; python_version >= '3.11' # Earliest version for Python 3.11 +numpy ~= 1.23.2; python_version == '3.11' # Earliest version for Python 3.11 +numpy ~= 1.26.0; python_version >= '3.12' # Earliest version for Python 3.12 opt_einsum ~= 3.3.0 protobuf ~= 3.20.3 # NOTE: Earliest version for Python 3.10 six ~= 1.16.0 termcolor ~= 2.1.1 -typing_extensions ~= 3.10.0.0 -wheel ~= 0.38.1 +typing_extensions ~= 4.8.0 +wheel ~= 0.41.2 wrapt ~= 1.14.1 # We need to pin the gast dependency exactly @@ -31,14 +32,15 @@ tb-nightly ~= 2.14.0.a tf-estimator-nightly ~= 2.14.0.dev # Test dependencies -grpcio ~= 1.49.1 # Earliest version for Python 3.11 -portpicker ~= 1.5.2 +grpcio ~= 1.59.0 # Earliest version for Python 3.12 +portpicker ~= 1.6.0 scipy ~= 1.7.2; python_version < '3.11' -scipy ~= 1.9.2; python_version >= '3.11' # Earliest version for Python 3.11 +scipy ~= 1.9.2; python_version == '3.11' # Earliest version for Python 3.11 +scipy ~= 1.11.3; python_version >= '3.12' # Earliest version for Python 3.12 # This is usually vendored in setuptools but ensure it gets installed in CI anyway # No bound here, we prefer the one in setuptools packaging # For using Python 3.11 with Bazel 6 (b/286090018) -lit ~= 16.0.5.post0 +lit ~= 17.0.2 diff --git a/tensorflow/tools/tf_sig_build_dockerfiles/builder.devtoolset/build_devtoolset.sh b/tensorflow/tools/tf_sig_build_dockerfiles/builder.devtoolset/build_devtoolset.sh index 6f4a566fcac306..b4c63677d7ae76 100755 --- a/tensorflow/tools/tf_sig_build_dockerfiles/builder.devtoolset/build_devtoolset.sh +++ b/tensorflow/tools/tf_sig_build_dockerfiles/builder.devtoolset/build_devtoolset.sh @@ -184,7 +184,7 @@ esac # TODO(klimek): Automate linking in all non-gcc / non-kernel include # directories. mkdir -p "/${TARGET}/usr/include/x86_64-linux-gnu" -PYTHON_VERSIONS=("python3.9" "python3.10" "python3.11") +PYTHON_VERSIONS=("python3.9" "python3.10" "python3.11" "python3.12") for v in "${PYTHON_VERSIONS[@]}"; do ln -s "/usr/local/include/${v}" "/${TARGET}/usr/include/x86_64-linux-gnu/${v}" done diff --git a/tensorflow/tools/tf_sig_build_dockerfiles/devel.requirements.txt b/tensorflow/tools/tf_sig_build_dockerfiles/devel.requirements.txt index 9e12049cc6b4dc..62e73c996b1829 100644 --- a/tensorflow/tools/tf_sig_build_dockerfiles/devel.requirements.txt +++ b/tensorflow/tools/tf_sig_build_dockerfiles/devel.requirements.txt @@ -8,19 +8,21 @@ absl-py ~= 1.0.0 astunparse ~= 1.6.3 flatbuffers ~= 23.5.26 google_pasta ~= 0.2 -h5py ~= 3.8.0 # Earliest version for Python 3.11 -ml_dtypes ~= 0.2 +h5py ~= 3.10.0 # Earliest version for Python 3.12 +ml_dtypes ~= 0.3.1 # TODO(b/262592253): Support older versions of NumPy for Python 3.10 and lower # to support TFX. Remove when Apache Beam upgrades to newer NumPy. numpy ~= 1.22.0; python_version < '3.11' -numpy ~= 1.23.2; python_version >= '3.11' # Earliest version for Python 3.11 +numpy ~= 1.23.2; python_version == '3.11' # Earliest version for Python 3.11 +numpy ~= 1.26.0; python_version >= '3.12' # Earliest version for Python 3.12 opt_einsum ~= 3.3.0 -packaging ~= 21.3 +packaging ~= 23.2 protobuf ~= 3.20.3 six ~= 1.16.0 termcolor ~= 2.1.1 -typing_extensions ~= 3.10.0.0 -wheel ~= 0.38.1 +typing_extensions ~= 4.8.0 +wheel ~= 0.41.2 +setuptools >= 68.2.2 wrapt ~= 1.14.1 # We need to pin the gast dependency exactly gast == 0.4.0 @@ -34,13 +36,14 @@ keras-nightly ~= 2.14.0.dev tb-nightly ~= 2.13.0.a tf-estimator-nightly ~= 2.14.0.dev # Test dependencies -grpcio ~= 1.49.1 # Earliest version for Python 3.11 -portpicker ~= 1.5.2 +grpcio ~= 1.59.0 # Earliest version for Python 3.12 +portpicker ~= 1.6.0 scipy ~= 1.7.2; python_version < '3.11' -scipy ~= 1.9.2; python_version >= '3.11' # Earliest version for Python 3.11 +scipy ~= 1.9.2; python_version == '3.11' # Earliest version for Python 3.11 +scipy ~= 1.11.3; python_version >= '3.12' # Earliest version for Python 3.12 # Required for TFLite import from JAX tests -jax ~= 0.3.25 -jaxlib ~= 0.3.25 # Earliest version for Python 3.11 +jax ~= 0.3.25; python_version <= '3.11' +jaxlib ~= 0.3.25; python_version <= '3.11' # Earliest version for Python 3.11 # Needs to be addressed. Unblocked 2.4 branchcut cl/338377048 PyYAML ~= 6.0 # For uploading @@ -52,4 +55,4 @@ lxml ~= 4.9.1 pylint ~= 2.13.9 # For using Python 3.11 with Bazel 6 (b/286090018) -lit ~= 16.0.5.post0 +lit ~= 17.0.2 diff --git a/tensorflow/tools/tf_sig_build_dockerfiles/setup.python.sh b/tensorflow/tools/tf_sig_build_dockerfiles/setup.python.sh index 98d23d03eb0006..007ee34858ed2e 100755 --- a/tensorflow/tools/tf_sig_build_dockerfiles/setup.python.sh +++ b/tensorflow/tools/tf_sig_build_dockerfiles/setup.python.sh @@ -59,6 +59,7 @@ fi curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py python3 -m pip install --no-cache-dir --upgrade pip +python3 -m pip install -U setuptools # Disable the cache dir to save image space, and install packages python3 -m pip install --no-cache-dir -r $REQUIREMENTS -U