Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
a027bbf4
"tests/git@developer.sourcefind.cn:OpenDAS/fairscale.git" did not exist on "3ecf76f42738e0b931a2a8defc439b395c413b8c"
Commit
a027bbf4
authored
Sep 25, 2023
by
Michael Yang
Browse files
fix dkms install
parent
ed94a3dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
scripts/install.sh
scripts/install.sh
+6
-3
No files found.
scripts/install.sh
View file @
a027bbf4
...
@@ -138,7 +138,6 @@ install_cuda_driver_yum() {
...
@@ -138,7 +138,6 @@ install_cuda_driver_yum() {
esac
esac
status
'Installing CUDA driver...'
status
'Installing CUDA driver...'
$SUDO
$PACKAGE_MANAGER
-y
update
if
[
"
$1
"
=
'centos'
]
||
[
"
$1$2
"
=
'rhel7'
]
;
then
if
[
"
$1
"
=
'centos'
]
||
[
"
$1$2
"
=
'rhel7'
]
;
then
$SUDO
$PACKAGE_MANAGER
-y
install
nvidia-driver-latest-dkms
$SUDO
$PACKAGE_MANAGER
-y
install
nvidia-driver-latest-dkms
...
@@ -192,7 +191,7 @@ if ! check_gpu nvidia-smi || [ -z "$(nvidia-smi | grep -o "CUDA Version: [0-9]*\
...
@@ -192,7 +191,7 @@ if ! check_gpu nvidia-smi || [ -z "$(nvidia-smi | grep -o "CUDA Version: [0-9]*\
case
$OS_NAME
in
case
$OS_NAME
in
centos|rhel
)
install_cuda_driver_yum
'rhel'
$OS_VERSION
;;
centos|rhel
)
install_cuda_driver_yum
'rhel'
$OS_VERSION
;;
rocky
)
install_cuda_driver_yum
'rhel'
$(
echo
$OS_VERSION
|
cut
-c1
)
;;
rocky
)
install_cuda_driver_yum
'rhel'
$(
echo
$OS_VERSION
|
cut
-c1
)
;;
fedora
)
install_cuda_driver_
dnf
$OS_NAME
$OS_VERSION
;;
fedora
)
install_cuda_driver_
yum
$OS_NAME
$OS_VERSION
;;
debian
)
install_cuda_driver_apt
$OS_NAME
$OS_VERSION
;;
debian
)
install_cuda_driver_apt
$OS_NAME
$OS_VERSION
;;
ubuntu
)
install_cuda_driver_apt
$OS_NAME
$(
echo
$OS_VERSION
|
sed
's/\.//'
)
;;
ubuntu
)
install_cuda_driver_apt
$OS_NAME
$(
echo
$OS_VERSION
|
sed
's/\.//'
)
;;
esac
esac
...
@@ -205,6 +204,10 @@ if ! lsmod | grep -q nvidia; then
...
@@ -205,6 +204,10 @@ if ! lsmod | grep -q nvidia; then
debian|ubuntu
)
$SUDO
apt-get
-y
install
linux-headers-
$KERNEL_RELEASE
;;
debian|ubuntu
)
$SUDO
apt-get
-y
install
linux-headers-
$KERNEL_RELEASE
;;
esac
esac
$SUDO
dkms status |
awk
-F
:
'/added/ { print $1 }'
| xargs
-n1
$SUDO
dkms
install
NVIDIA_CUDA_VERSION
=
$(
dkms status |
awk
-F
:
'/added/ { print $1 }'
)
if
[
-n
"
$NVIDIA_CUDA_VERSION
"
]
;
then
$SUDO
dkms
install
$NVIDIA_CUDA_VERSION
fi
$SUDO
modprobe nvidia
$SUDO
modprobe nvidia
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment