forked from mikew-heavyai/heavyai-devstack
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnvidiaDriver1.sh
More file actions
executable file
·34 lines (24 loc) · 872 Bytes
/
nvidiaDriver1.sh
File metadata and controls
executable file
·34 lines (24 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# !/bin/bash
# This script simply configurs Nvidia drivers in a typical Linux environment.
install_nvidia_drivers(){
sudo apt install linux-headers-$(uname -r)
sudo apt install pciutils
sudo apt install libvulkan1
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-4
sudo apt-get install -y cuda-drivers
}
install_package() {
local package_name=$1
read -p "If you are running on A100 you should install $package_name? (y/n): " response
if [[ $response == "y" || $response == "Y" ]]; then
sudo apt update
sudo apt install -y $package_name
else
echo "$package_name installation skipped."
fi
}
install_nvidia_drivers
install_package "nvidia-fabricmanager-555"