fix(ci): add libcuda.so.1 stub for test stage on GPU-less nodes
The backtesting crate dynamically links to libcuda.so.1 via candle. NVIDIA CUDA dev images include stubs at /usr/local/cuda/lib64/stubs/ but only as libcuda.so (not .so.1). Create the symlink both in the Dockerfile (for future builds) and inline in the test script (for the current image). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,9 @@ test:
|
||||
stage: test
|
||||
needs: [check]
|
||||
script:
|
||||
# Create libcuda.so.1 symlink to stub (GPU-less CI nodes)
|
||||
- ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
|
||||
- export LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH}"
|
||||
- cargo test --workspace --lib
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
@@ -46,5 +46,9 @@ ENV CUDA_HOME=/usr/local/cuda
|
||||
ENV PATH="${CUDA_HOME}/bin:${PATH}"
|
||||
ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
|
||||
|
||||
# libcuda.so.1 stub — satisfies runtime linking on GPU-less CI nodes
|
||||
# (the stubs dir has libcuda.so but binaries want libcuda.so.1)
|
||||
RUN ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
|
||||
|
||||
# Verify
|
||||
RUN rustc --version && cargo --version && git --version && protoc --version && sccache --version && make --version && nvcc --version
|
||||
|
||||
Reference in New Issue
Block a user