Skip to content

Commit 3b1412a

Browse files
seanpmorganfacaiy
authored andcommitted
Patch manylinux2010 auditwheel repair so libtensorflow is not copied (#435)
* Patch manylinux2010 auditwheel repair so libtensorflow is not copied * Simplify patch
1 parent 9c67102 commit 3b1412a

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

tools/ci_build/builds/release_linux.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ ln -sf /usr/bin/python3.5 /usr/bin/python3 # Py36 has issues with add-apt
2020
curl -sSOL https://bootstrap.pypa.io/get-pip.py
2121
add-apt-repository -y ppa:deadsnakes/ppa
2222

23+
apt-get -y -qq update
24+
2325
for version in ${PYTHON_VERSIONS}; do
2426
export PYTHON_VERSION=${version}
25-
apt-get -y -qq update && apt-get -y -qq install ${PYTHON_VERSION}
27+
apt-get -y -qq install ${PYTHON_VERSION}
2628

2729
${PYTHON_VERSION} get-pip.py -q
2830
${PYTHON_VERSION} -m pip --version
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ==============================================================================
16+
17+
set -e
18+
19+
TF_SHARED_LIBRARY_NAME=$(grep -r TF_SHARED_LIBRARY_NAME .bazelrc | awk -F= '{print$2}')
20+
POLICY_JSON="/usr/local/lib/python3.6/dist-packages/auditwheel/policy/policy.json"
21+
sed -i "s/libresolv.so.2\"/libresolv.so.2\", $TF_SHARED_LIBRARY_NAME/g" $POLICY_JSON

tools/ci_build/builds/wheel_verify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set -e
1919
if [[ $(uname) == "Darwin" ]]; then
2020
CMD="delocate-wheel -w wheelhouse"
2121
else
22-
LD_PATH="$(cat .bazelrc | grep TF_SHARED_LIBRARY_DIR | sed 's/"//g' | awk -F'=' '{print $2}')"
23-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_PATH
22+
pip3.6 install -U auditwheel==2.0.0
23+
tools/ci_build/builds/tf_auditwheel_patch.sh
2424
CMD="auditwheel repair --plat manylinux2010_x86_64"
2525
fi
2626

0 commit comments

Comments
 (0)