Skip to content

Commit 1b6be82

Browse files
committed
Fixup wheel published to PyPI
1 parent eb011e3 commit 1b6be82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

release/pypi/prep_binary_for_pypi.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ for whl_file in "$@"; do
5454

5555
# Special build with pypi cudnn remove it from version
5656
if [[ $whl_file == *"with.pypi.cudnn"* ]]; then
57+
rm -rf "${whl_dir}/caffe2"
58+
rm -rf "${whl_dir}"/torch/lib/libnvrtc*
59+
find "${whl_dir}/torch/include/caffe2" -maxdepth 1 -type d|grep -v serialize|xargs rm -rf
60+
sed -i -e "/^Requires-Dist: nvidia-cublas-cu11 (==11.10.3.66).*/a Requires-Dist: nvidia-cuda-nvrtc-cu11 (==11.7.99)" "${whl_dir}"/*/METADATA
61+
5762
sed -i -e "s/-with-pypi-cudnn//g" "${whl_dir}/torch/version.py"
63+
patchelf --set-rpath '$ORIGIN/../../nvidia/cublas/lib:$ORIGIN/../../nvidia/cudnn/lib:$ORIGIN/../../nvidia/cuda_nvrtc/lib:$ORIGIN' \
64+
$(find "${whl_dir}/torch/lib" -name "*.so")
5865
fi
5966

6067
find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \;

0 commit comments

Comments
 (0)