From 7a2a85d45702e937c4aa92ec90118ed12e1067d7 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Wed, 25 Feb 2026 19:30:40 +0100 Subject: [PATCH] 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 --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c5d1e367..0c8ddbeb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 # --------------------------------------------------------------------------