Skip to content

Commit 4040d51

Browse files
NicolasHugjithunnair-amd
authored andcommitted
Fix post-build-script (pytorch#8982)
(cherry picked from commit 29066f5)
1 parent 7af6987 commit 4040d51

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

packaging/post_build_script.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/bin/bash
2-
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
2+
set -euxo pipefail
3+
4+
if [ -n "${CUDA_HOME:-}" ]; then
5+
LD_LIBRARY_PATH="/usr/local/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
6+
fi
7+
8+
python packaging/wheel/relocate.py
39

410
pip install torchvision-extra-decoders

packaging/pre_build_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ else
3535
conda install libwebp -yq
3636
conda install libjpeg-turbo -c pytorch
3737
yum install -y freetype gnutls
38-
pip install auditwheel
38+
pip install "auditwheel<6.3.0"
3939
fi
4040

4141
pip install numpy pyyaml future ninja

packaging/wheel/relocate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515

1616
# Third party imports
1717
if sys.platform == "linux":
18-
from auditwheel.lddtree import lddtree
18+
try:
19+
from auditwheel.lddtree import lddtree
20+
except ImportError:
21+
from auditwheel import lddtree
1922

2023

2124
ALLOWLIST = {

0 commit comments

Comments
 (0)