diff --git a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython index c14eadcada4..54bb4b3773f 100644 --- a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython +++ b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython @@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y \ flex \ g++ \ make \ + patchelf \ rpm2cpio \ unar \ wget \ @@ -55,6 +56,10 @@ RUN /install/install_bootstrap_deb_packages.sh COPY install/install_deb_packages.sh /install/ RUN /install/install_deb_packages.sh +# Install patchelf to facilitate the creation of manylinux2010 whls. +COPY install/install_patchelf.sh /install/ +RUN /install/install_patchelf.sh + # Install additional dependencies to build Python from source. RUN apt-get update && apt-get install -y \ libncurses5-dev \ @@ -82,6 +87,9 @@ RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.5" RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.6" RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7" +# Install auditwheel to create manylinux2010 compliant binaries +RUN pip3 install auditwheel + ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d" COPY install/install_latest_clang.sh /install/ RUN /install/install_latest_clang.sh diff --git a/tensorflow/tools/ci_build/install/install_patchelf.sh b/tensorflow/tools/ci_build/install/install_patchelf.sh new file mode 100644 index 00000000000..44a91c78b07 --- /dev/null +++ b/tensorflow/tools/ci_build/install/install_patchelf.sh @@ -0,0 +1,17 @@ +#!/bin/bash -eu +# Copyright 2020 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============================================================================== + +apt-get update && apt-get install -y patchelf