Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cuda-all-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash

# GKE injects /usr/local/nvidia from the host but does not add it to PATH or
# run ldconfig for it, unlike the nvidia-container-runtime on AWS which does both.
if [ -d /usr/local/nvidia/bin ]; then
export PATH="${PATH}:/usr/local/nvidia/bin"
fi
if [ -d /usr/local/nvidia/lib64 ]; then
echo /usr/local/nvidia/lib64 > /etc/ld.so.conf.d/nvidia-host.conf
ldconfig
fi

if ! command -v nvidia-smi &>/dev/null; then
echo "Error: 'nvidia-smi' command not found."
exit 1
Expand Down
10 changes: 10 additions & 0 deletions cuda-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash

# GKE injects /usr/local/nvidia from the host but does not add it to PATH or
# run ldconfig for it, unlike the nvidia-container-runtime on AWS which does both.
if [ -d /usr/local/nvidia/bin ]; then
export PATH="${PATH}:/usr/local/nvidia/bin"
fi
if [ -d /usr/local/nvidia/lib64 ]; then
echo /usr/local/nvidia/lib64 > /etc/ld.so.conf.d/nvidia-host.conf
ldconfig
fi

if ! command -v nvidia-smi &>/dev/null; then
echo "Error: 'nvidia-smi' command not found."
exit 1
Expand Down
Loading