Skip to content

Commit 5c7b021

Browse files
committed
Add support for modern manylinux_2_28 container builds, manylinux_2_35 wheel stamping, and Python 3.13 support
1 parent dfbd244 commit 5c7b021

6 files changed

Lines changed: 80 additions & 2 deletions

File tree

.bazelrc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,36 @@ build:macos --macos_minimum_os=10.12
5353
common --noenable_bzlmod
5454

5555
test --noincompatible_check_sharding_support
56+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
57+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
58+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
59+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
60+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
61+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
62+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
63+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
64+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
65+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
66+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
67+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
68+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
69+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
70+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
71+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
72+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
73+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
74+
build --action_env TF_HEADER_DIR="/usr/local/google/home/vkarampudi/anaconda3/lib/python3.12/site-packages/tensorflow/include"
75+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/google/home/vkarampudi/anaconda3/lib/python3.12/site-packages/tensorflow"
76+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
77+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
78+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
79+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
80+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
81+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
82+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
83+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
84+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
85+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"
86+
build --action_env TF_HEADER_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow/include"
87+
build --action_env TF_SHARED_LIBRARY_DIR="/usr/local/lib/python3.12/dist-packages/tensorflow"
88+
build --action_env TF_SHARED_LIBRARY_NAME="libtensorflow_framework.so.2"

RELEASE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515
* Disabled Bzlmod in `.bazelrc` to resolve protobuf conflicts.
1616
* Added dummy repositories in `WORKSPACE` to bypass circular dependencies with TensorFlow.
1717
* Fixed missing `#include <cstdint>` in various files to support compilation with `gcc 15`.
18+
* Added support for Python 3.13.
19+
* Upgraded Bazel global pin to `7.7.0`.
20+
* Upgraded release build container configurations from legacy `manylinux2014` to modern `manylinux_2_28`.
21+
* Stamps dynamic release wheels to match `manylinux_2_35` dynamic system dependencies.
1822
* Added support for Python 3.12.
1923
* Dropped support for Python 3.9.
2024

25+
2126
## Breaking Changes
2227

2328
* N/A

build_common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function install_tensorflow() {
2323

2424
#TODO(b/329181965): As TFX lags for TensorFlow version, let's pass
2525
#the ceiling TF Version to the installation script.
26-
TF_MAX_VERSION = $4
26+
TF_MAX_VERSION=$4
2727

2828
if [[ ("$1" == NIGHTLY_TF) || ("$1" == NIGHTLY_TF_2) ]]; then
2929
TF_PIP_PACKAGE="tf-nightly"

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ services:
3535
dockerfile: struct2tensor/tools/docker_build/Dockerfile.manylinux2014
3636
volumes:
3737
- .:/struct2tensor:delegated
38+
39+
manylinux_2_28:
40+
image: struct2tensor-build:manylinux_2_28
41+
build:
42+
context: .
43+
dockerfile: struct2tensor/tools/docker_build/Dockerfile.manylinux_2_28
44+
volumes:
45+
- .:/struct2tensor:delegated
46+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Dockerfile for building a manylinux_2_28 struct2tensor wheel.
16+
ARG PYTHON_VERSION
17+
FROM tensorflow/build:latest-python${PYTHON_VERSION}
18+
WORKDIR /struct2tensor
19+
20+
# devtoolset environment compiler path for modern glibc
21+
ENV CC=/usr/bin/gcc
22+
23+
# Clean up pre-installed tf-nightly packages
24+
RUN pip uninstall -y tf-nightly tb-nightly tf-estimator-nightly keras-nightly
25+
26+
RUN pip install --upgrade auditwheel
27+
28+
29+
CMD ["struct2tensor/tools/docker_build/build_manylinux.sh"]

struct2tensor/tools/docker_build/build_manylinux.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ function stamp_wheel() {
9696
zip "${WHEEL_PATH}" "${SO_FILE_PATH}" || exit 1;
9797
done
9898
popd
99-
auditwheel repair --plat manylinux2014_x86_64 -w "${WHEEL_DIR}" "${WHEEL_PATH}" || exit 1;
99+
PLATFORM_TAG="${AUDITWHEEL_PLAT_TAG:-manylinux2014}"
100+
auditwheel repair --plat "${PLATFORM_TAG}_x86_64" -w "${WHEEL_DIR}" "${WHEEL_PATH}" || exit 1;
101+
100102
rm "${WHEEL_PATH}" || exit 1;
101103
MANY_LINUX_WHEEL_PATH=$(ls "${WHEEL_DIR}"/*manylinux*.whl)
102104
# Unzip the wheel and pack it again with the original .so file.

0 commit comments

Comments
 (0)