Skip to content

Commit

Permalink
[CI][DOCKER] Fix cuda11 nvidia-docker support for non-Tesla gpus (apa…
Browse files Browse the repository at this point in the history
…che#8163)

Starting cuda11, libcuda can be linked to a version of libcuda in
/usr/local/cuda/compact. The particular linked library
does not work for non-Tesla GPUs, causing "no CUDA capable devices found"
even though nvidia-smi shows available GPUs.

This PR makes makes sure we always prioritize linking
/usr/lib/x86_64-linux-gnu/libcuda.so.1

so the nvidia docker cuda11 images works for non-Tesla GPU envs.
  • Loading branch information
tqchen authored and mehrdadh committed Jun 3, 2021
1 parent 703d692 commit b657cd7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/Dockerfile.ci_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ ENV C_INCLUDE_PATH=/usr/local/cuda/include:${C_INCLUDE_PATH}
ENV LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compat:${LIBRARY_PATH}
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/compat:${LD_LIBRARY_PATH}

# Ensure the local libcuda have higher priority than the /usr/local/cuda/compact
# since the compact libcuda does not work on non-Tesla gpus
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}

ENV LD_LIBRARY_PATH=/opt/rocm/lib:${LD_LIBRARY_PATH}
ENV PATH=/node_modules/.bin:${PATH}
ENV VULKAN_SDK=/usr

0 comments on commit b657cd7

Please sign in to comment.