Add a 3.12 Docker container.

PiperOrigin-RevId: 575881215
This commit is contained in:
A. Unique TensorFlower 2023-10-23 11:37:41 -07:00 committed by TensorFlower Gardener
parent 360b6e3e12
commit a9e19d0de0
7 changed files with 32 additions and 25 deletions

View File

@ -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

View File

@ -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`

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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