Update ML Build Docker container to use hermetic C++

PiperOrigin-RevId: 814816242
This commit is contained in:
Quoc Truong 2025-10-03 13:46:55 -07:00 committed by TensorFlower Gardener
parent 70c65cb4e0
commit 39e05ea1fb
3 changed files with 1 additions and 37 deletions

View File

@ -12,14 +12,6 @@ COPY builder.packages.txt /builder.packages.txt
RUN /setup.sources.sh && /setup.packages.sh /builder.packages.txt
# Install devtoolset-9 in /dt9 with glibc 2.17 and libstdc++ 4.8, for building
# manylinux2014-compatible packages.
COPY builder.devtoolset/fixlinks.sh /fixlinks.sh
COPY builder.devtoolset/rpm-patch.sh /rpm-patch.sh
COPY builder.devtoolset/build_devtoolset.sh /build_devtoolset.sh
COPY builder.devtoolset/glibc2.17-inline.patch /glibc2.17-inline.patch
RUN /build_devtoolset.sh devtoolset-9 /dt9
# Setup Python
COPY setup.python.sh /setup.python.sh
COPY builder.requirements.txt /builder.requirements.txt

View File

@ -1,28 +1,9 @@
# Packages to be installed for the new Docker image.
# Packages needed to build devtoolset
file
flex
g++
make
patch
rpm2cpio
unar
wget
xz-utils
cpio
# Other build-related tools
apt-transport-https
autoconf
automake
build-essential
ca-certificates
llvm-18
clang-18
clang-tidy-18
lld-18
clang-format-12
curl
git
parallel
@ -32,4 +13,5 @@ unzip
zip
openjdk-21-jdk
vim
wget
jq

View File

@ -45,16 +45,6 @@ fi
/setup.packages.sh pythons.txt
# Re-link pyconfig.h from x86_64-linux-gnu into the devtoolset directory
# for any Python version present
pushd /usr/include/x86_64-linux-gnu
for f in $(ls | grep python); do
# set up symlink for devtoolset-9
rm -f /dt9/usr/include/x86_64-linux-gnu/$f
ln -s /usr/include/x86_64-linux-gnu/$f /dt9/usr/include/x86_64-linux-gnu/$f
done
popd
# Python 3.10 include headers fix:
# sysconfig.get_path('include') incorrectly points to /usr/local/include/python
# map /usr/include/python3.10 to /usr/local/include/python3.10