diff --git a/docker/Dockerfile b/docker/Dockerfile index 71cef521bed6..632118ad4d0b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -132,8 +132,8 @@ ENV UV_LINK_MODE=copy # Verify GCC version RUN gcc --version -# Ensure CUDA compatibility library is loaded -RUN echo "/usr/local/cuda-$(echo "$CUDA_VERSION" | cut -d. -f1,2)/compat/" > /etc/ld.so.conf.d/cuda-compat.conf && ldconfig +# Ensure CUDA compatibility library is loaded at last to avoid overriding the system libraries +RUN echo "/usr/local/cuda-$(echo "$CUDA_VERSION" | cut -d. -f1,2)/compat/" > /etc/ld.so.conf.d/zzz-cuda-compat.conf && ldconfig # ============================================================ # SLOW-CHANGING DEPENDENCIES BELOW @@ -560,8 +560,8 @@ ENV UV_HTTP_TIMEOUT=500 ENV UV_INDEX_STRATEGY="unsafe-best-match" ENV UV_LINK_MODE=copy -# Ensure CUDA compatibility library is loaded -RUN echo "/usr/local/cuda-$(echo "$CUDA_VERSION" | cut -d. -f1,2)/compat/" > /etc/ld.so.conf.d/cuda-compat.conf && ldconfig +# Ensure CUDA compatibility library is loaded at last to avoid overriding the system libraries +RUN echo "/usr/local/cuda-$(echo "$CUDA_VERSION" | cut -d. -f1,2)/compat/" > /etc/ld.so.conf.d/zzz-cuda-compat.conf && ldconfig # ============================================================ # SLOW-CHANGING DEPENDENCIES BELOW