Skip to content

Commit

Permalink
DRIVER VERSIONS can be xxx.yy.zz if coming from side branches
Browse files Browse the repository at this point in the history
  • Loading branch information
sgodithi1 committed Mar 22, 2019
1 parent 8a75a15 commit c40bbb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nvidia_entrypoint.sh
Expand Up @@ -24,9 +24,9 @@ if [[ "$(find /usr -name libcuda.so.1 | grep -v "compat") " == " " || "$(ls /dev
else
( /usr/local/bin/checkSMVER.sh )
DRIVER_VERSION=$(sed -n 's/^NVRM.*Kernel Module *\([0-9.]*\).*$/\1/p' /proc/driver/nvidia/version 2>/dev/null || true)
if [[ ! "$DRIVER_VERSION" =~ ^[0-9]*.[0-9]*$ ]]; then
if [[ ! "$DRIVER_VERSION" =~ ^[0-9]*.[0-9]*(.[0-9]*)?$ ]]; then
echo "Failed to detect NVIDIA driver version."
elif [[ "${DRIVER_VERSION%.*}" -lt "${CUDA_DRIVER_VERSION%.*}" ]]; then
elif [[ "${DRIVER_VERSION%%.*}" -lt "${CUDA_DRIVER_VERSION%%.*}" ]]; then
if [[ "${_CUDA_COMPAT_STATUS}" == "CUDA Driver OK" ]]; then
echo
echo "NOTE: Legacy NVIDIA Driver detected. Compatibility mode ENABLED."
Expand Down

0 comments on commit c40bbb4

Please sign in to comment.