Skip to content

Commit

Permalink
Patch auditwheel to whitelist tensorflow dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed Aug 19, 2019
1 parent 705ab78 commit 02dcf4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis/python.release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ else

ls dist/*
for f in dist/*.whl; do
docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host -e LD_LIBRARY_PATH=/v/build quay.io/pypa/manylinux2010_x86_64 auditwheel repair --plat manylinux2010_x86_64 $f
docker run -i --rm -v $PWD:/v -w /v --net=host quay.io/pypa/manylinux2010_x86_64 bash -x -e /v/third_party/tf/auditwheel repair --plat manylinux2010_x86_64 $f
done
sudo chown -R $(id -nu):$(id -ng) .
ls wheelhouse/*
fi
9 changes: 9 additions & 0 deletions third_party/tf/auditwheel
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TF_SHARED_LIBRARY_NAME=$(grep -r TF_SHARED_LIBRARY_NAME .bazelrc | awk -F= '{print$2}')

POLICY_JSON=$(find / -name policy.json)

sed -i "s/libresolv.so.2\"/libresolv.so.2\", $TF_SHARED_LIBRARY_NAME/g" $POLICY_JSON

cat $POLICY_JSON

auditwheel $@

0 comments on commit 02dcf4a

Please sign in to comment.