File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,12 @@ ENV GIT_COMMIT=${GIT_COMMIT} \
158158RUN echo " $GIT_COMMIT" > /etc/git_commit && echo " $BUILD_DATE" > /etc/build_date
159159
160160{{ if eq .Accelerator " gpu" }}
161- # Add the CUDA home.
162- ENV CUDA_HOME= /usr/local/cuda
161+ # Add the CUDA home and ensure NVIDIA driver libs (mounted by the NVIDIA Container
162+ # Toolkit at runtime into /usr/local/nvidia/lib64) are on the library path.
163+ ENV CUDA_HOME= /usr/local/cuda \
164+ LD_LIBRARY_PATH= /usr/local/nvidia/lib64:/usr/local/cuda/lib64:$ {LD_LIBRARY_PATH}
165+ # Register the NVIDIA driver lib path with the dynamic linker so libraries can
166+ # be found even without LD_LIBRARY_PATH being set.
167+ RUN echo '/usr/local/nvidia/lib64' > /etc/ld.so.conf.d /nvidia-driver.conf && ldconfig 2>/dev/null || true
163168{{ end }}
164169ENTRYPOINT [" /usr/bin/env" ]
You can’t perform that action at this time.
0 commit comments