Skip to content

Fix post-build-script #8982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packaging/post_build_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
set -euxo pipefail

if [ -n "${CUDA_HOME:-}" ]; then
LD_LIBRARY_PATH="/usr/local/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
fi

python packaging/wheel/relocate.py

if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"
Expand Down
2 changes: 1 addition & 1 deletion packaging/pre_build_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else
conda install libwebp -y
conda install libjpeg-turbo -c pytorch
yum install -y freetype gnutls
pip install auditwheel
pip install "auditwheel<6.3.0"
fi

pip install numpy pyyaml future ninja
Expand Down
5 changes: 4 additions & 1 deletion packaging/wheel/relocate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

# Third party imports
if sys.platform == "linux":
from auditwheel.lddtree import lddtree
try:
from auditwheel.lddtree import lddtree
except ImportError:
from auditwheel import lddtree


ALLOWLIST = {
Expand Down