Skip to content

Commit 4008962

Browse files
committed
Protect CUDA_HOME
1 parent dcd783b commit 4008962

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packaging/post_build_script.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/bin/bash
22
set -euxo pipefail
33

4-
LD_LIBRARY_PATH="/usr/local/lib:$CUDA_HOME/lib64:$LD_LIBRARY_PATH" python packaging/wheel/relocate.py
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
59

610
if [[ "$(uname)" == "Linux" && "$(uname -m)" != "aarch64" ]]; then
711
extra_decoders_channel="--pre --index-url https://download.pytorch.org/whl/nightly/cpu"

0 commit comments

Comments
 (0)