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
dc0c725c
Unverified
Commit
dc0c725c
authored
Sep 22, 2023
by
Bruce MacDonald
Committed by
GitHub
Sep 22, 2023
Browse files
ubuntu cuda drivers (#576)
parent
5d71bda4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
scripts/install.sh
scripts/install.sh
+20
-2
No files found.
scripts/install.sh
View file @
dc0c725c
...
@@ -42,10 +42,11 @@ check_sudo() {
...
@@ -42,10 +42,11 @@ check_sudo() {
}
}
install_cuda_drivers
()
{
install_cuda_drivers
()
{
local
os_name
local
os_name
os_version
if
[
-f
"/etc/os-release"
]
;
then
if
[
-f
"/etc/os-release"
]
;
then
.
/etc/os-release
.
/etc/os-release
os_name
=
$ID
os_name
=
$ID
os_version
=
$VERSION_ID
else
else
echo
"Unable to detect operating system. Skipping CUDA installation."
echo
"Unable to detect operating system. Skipping CUDA installation."
return
1
return
1
...
@@ -63,7 +64,24 @@ install_cuda_drivers() {
...
@@ -63,7 +64,24 @@ install_cuda_drivers() {
$SUDO_CMD
dkms status |
awk
-F
:
'/added/ { print $1 }'
| xargs
-n1
$SUDO_CMD
dkms
install
$SUDO_CMD
dkms status |
awk
-F
:
'/added/ { print $1 }'
| xargs
-n1
$SUDO_CMD
dkms
install
$SUDO_CMD
modprobe nvidia
$SUDO_CMD
modprobe nvidia
;;
;;
RedHatEnterprise
*
|
Kylin|Fedora|SLES|openSUSE
*
|
Microsoft|Ubuntu|Debian
)
ubuntu
)
case
$os_version
in
20.04
)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
;;
22.04
)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
;;
*
)
echo
"Skipping automatic CUDA installation, not supported for Ubuntu (
$os_version
)."
return
;;
esac
$SUDO_CMD
dpkg
-i
cuda-keyring_1.1-1_all.deb
$SUDO_CMD
apt-get update
$SUDO_CMD
apt-get
-y
install
cuda-drivers
;;
RedHatEnterprise
*
|
Kylin|Fedora|SLES|openSUSE
*
|
Microsoft|Debian
)
echo
"NVIDIA CUDA drivers may not be installed, you can install them from: https://developer.nvidia.com/cuda-downloads"
echo
"NVIDIA CUDA drivers may not be installed, you can install them from: https://developer.nvidia.com/cuda-downloads"
;;
;;
*
)
*
)
...
...
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