PiperOrigin-RevId: 815778083
This commit is contained in:
Quoc Truong 2025-10-06 10:10:26 -07:00 committed by TensorFlower Gardener
parent 9438200478
commit a7fc821eb1
3 changed files with 37 additions and 1 deletions

View File

@ -12,6 +12,14 @@ 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,9 +1,28 @@
# 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
@ -13,5 +32,4 @@ unzip
zip
openjdk-21-jdk
vim
wget
jq

View File

@ -45,6 +45,16 @@ 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