Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into cluster-object-model-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ydye committed Dec 4, 2018
2 parents 51c34d1 + de36749 commit 9c0d086
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/drivers/build/install-all-drivers
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NV_DRIVER/lib:$NV_DRIVER/lib64
export PATH=$PATH:$NV_DRIVER/bin

if lspci | grep -qE "[0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F].[0-9] (3D|VGA compatible) controller: NVIDIA Corporation.*"; then
if [ -d "$PRE_INSTALLED_NV_DRIVER_PATH" ]; then
if [ -f "$PRE_INSTALLED_NV_DRIVER_PATH/bin/nvidia-smi" ]; then
ls -a $PRE_INSTALLED_NV_DRIVER_PATH
echo pre installed nvidia driver detectived, skip driver installation
rm -f $DRIVER_PATH/current # remove pre-exist link
mkdir -p $DRIVER_PATH
ln -s $PRE_INSTALLED_NV_DRIVER_PATH $DRIVER_PATH/current
else
/bin/bash install-nvidia-drivers || exit $?
/bin/bash -x install-nvidia-drivers || exit $?
echo NVIDIA gpu detected, drivers installed

/bin/bash enable-nvidia-persistenced-mode.sh || exit $?
Expand Down
3 changes: 2 additions & 1 deletion src/drivers/build/install-nvidia-drivers
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function nvidiaPresent {
}

echo ======== If NVIDIA present exit early =========
if [ nvidiaPresent ] ; then
nvidiaPresent
if [ $? == 0 ] ; then
if [[ ! -L $CURRENT_DRIVER ]]; then
mkdir -p `dirname $CURRENT_DRIVER`
ln -s $DRIVER_PATH/$NVIDIA_VERSION $CURRENT_DRIVER
Expand Down

0 comments on commit 9c0d086

Please sign in to comment.