fix(ci): remove CUDA stubs from LD_LIBRARY_PATH for GPU test runtime

The CI builder image prepends /usr/local/cuda/lib64/stubs to
LD_LIBRARY_PATH (for GPU-less compilation). On H100 with nvidia
RuntimeClass, the stub libcuda.so shadows the real driver library,
causing CUDA_ERROR_STUB_LIBRARY at test runtime. Strip stubs dir
before running tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-02-25 19:30:40 +01:00
parent 3ce5c3a58b
commit 7a2a85d457

View File

@@ -85,7 +85,9 @@ test:
stage: test
needs: [check]
script:
# All tests run on H100 node — real CUDA available, no stubs needed
# Remove CUDA stubs from LD_LIBRARY_PATH — nvidia RuntimeClass provides real libcuda.so
- export LD_LIBRARY_PATH=$(echo "$LD_LIBRARY_PATH" | tr ':' '\n' | grep -v stubs | tr '\n' ':' | sed 's/:$//')
- nvidia-smi # verify GPU access
- cargo test --workspace --lib -- --skip model_loader::tests
# --------------------------------------------------------------------------