Skip to content

Commit 4b213c1

Browse files
committed
fix: Prevent GHA failure when .venv is missing in run_tests_against_package
1 parent f0842ca commit 4b213c1

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/run_tests_against_package.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,15 @@ jobs:
162162
# Dynamically discover the 'nvidia' folder and prepend all its sub-library
163163
# directories (including nccl, cublas, cudnn) to LD_LIBRARY_PATH to prevent
164164
# JAX from partially loading incompatible system-level CUDA libraries.
165-
NVIDIA_DIR=$(find .venv/lib/ -maxdepth 3 -name "nvidia" -type d 2>/dev/null | head -n 1)
166-
if [ -n "${NVIDIA_DIR}" ]; then
167-
for dir in "${NVIDIA_DIR}"/*; do
168-
if [ -d "$dir/lib" ]; then
169-
export LD_LIBRARY_PATH=$(pwd)/$dir/lib:${LD_LIBRARY_PATH}
170-
fi
171-
done
165+
if [ -d ".venv/lib" ]; then
166+
NVIDIA_DIR=$(find .venv/lib/ -maxdepth 3 -name "nvidia" -type d 2>/dev/null | head -n 1)
167+
if [ -n "${NVIDIA_DIR}" ]; then
168+
for dir in "${NVIDIA_DIR}"/*; do
169+
if [ -d "$dir/lib" ]; then
170+
export LD_LIBRARY_PATH=$(pwd)/$dir/lib:${LD_LIBRARY_PATH}
171+
fi
172+
done
173+
fi
172174
fi
173175
fi
174176
if [ "${INPUTS_TOTAL_WORKERS}" -gt 1 ]; then

0 commit comments

Comments
 (0)