diff --git a/tools/ci_build/builds/release_linux.sh b/tools/ci_build/builds/release_linux.sh index d03b3bc33d..a1f2836b96 100755 --- a/tools/ci_build/builds/release_linux.sh +++ b/tools/ci_build/builds/release_linux.sh @@ -20,9 +20,11 @@ ln -sf /usr/bin/python3.5 /usr/bin/python3 # Py36 has issues with add-apt curl -sSOL https://bootstrap.pypa.io/get-pip.py add-apt-repository -y ppa:deadsnakes/ppa +apt-get -y -qq update + for version in ${PYTHON_VERSIONS}; do export PYTHON_VERSION=${version} - apt-get -y -qq update && apt-get -y -qq install ${PYTHON_VERSION} + apt-get -y -qq install ${PYTHON_VERSION} ${PYTHON_VERSION} get-pip.py -q ${PYTHON_VERSION} -m pip --version diff --git a/tools/ci_build/builds/tf_auditwheel_patch.sh b/tools/ci_build/builds/tf_auditwheel_patch.sh new file mode 100755 index 0000000000..52f4c19500 --- /dev/null +++ b/tools/ci_build/builds/tf_auditwheel_patch.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright 2019 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. +# ============================================================================== + +set -e + +TF_SHARED_LIBRARY_NAME=$(grep -r TF_SHARED_LIBRARY_NAME .bazelrc | awk -F= '{print$2}') +POLICY_JSON="/usr/local/lib/python3.6/dist-packages/auditwheel/policy/policy.json" +sed -i "s/libresolv.so.2\"/libresolv.so.2\", $TF_SHARED_LIBRARY_NAME/g" $POLICY_JSON diff --git a/tools/ci_build/builds/wheel_verify.sh b/tools/ci_build/builds/wheel_verify.sh index 628813dd3c..e43042e281 100755 --- a/tools/ci_build/builds/wheel_verify.sh +++ b/tools/ci_build/builds/wheel_verify.sh @@ -19,8 +19,8 @@ set -e if [[ $(uname) == "Darwin" ]]; then CMD="delocate-wheel -w wheelhouse" else - LD_PATH="$(cat .bazelrc | grep TF_SHARED_LIBRARY_DIR | sed 's/"//g' | awk -F'=' '{print $2}')" - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_PATH + pip3.6 install -U auditwheel==2.0.0 + tools/ci_build/builds/tf_auditwheel_patch.sh CMD="auditwheel repair --plat manylinux2010_x86_64" fi