@@ -41,13 +41,29 @@ func TestNVDriverTemplate(t *testing.T) {
41
41
},
42
42
expectedOutput : `
43
43
44
- sudo apt-get update
45
- install_packages_with_retry linux-headers-$(uname -r)
44
+ # Install Dependencies
45
+ with_retry 3 10s sudo apt-get update
46
+ install_packages_with_retry linux-headers-$(uname -r) gcc make
47
+ install_packages_with_retry apt-utils build-essential \
48
+ ca-certificates \
49
+ curl \
50
+ kmod \
51
+ file \
52
+ libelf-dev \
53
+ libglvnd-dev \
54
+ pkg-config
55
+
56
+ install_packages_with_retry gcc-12 g++-12 && \
57
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 && \
58
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
59
+
60
+ # Install the new cuda-keyring package
46
61
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
47
62
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.1-1_all.deb
48
63
sudo dpkg -i cuda-keyring_1.1-1_all.deb
49
-
50
64
with_retry 3 10s sudo apt-get update
65
+
66
+ # Install the NVIDIA driver
51
67
install_packages_with_retry cuda-drivers=123.4.5
52
68
53
69
# Check if NVIDIA module is loaded, if not load it
@@ -68,14 +84,29 @@ nvidia-smi
68
84
Branch : "550" ,
69
85
},
70
86
expectedOutput : `
71
-
72
- sudo apt-get update
73
- install_packages_with_retry linux-headers-$(uname -r)
87
+ # Install Dependencies
88
+ with_retry 3 10s sudo apt-get update
89
+ install_packages_with_retry linux-headers-$(uname -r) gcc make
90
+ install_packages_with_retry apt-utils build-essential \
91
+ ca-certificates \
92
+ curl \
93
+ kmod \
94
+ file \
95
+ libelf-dev \
96
+ libglvnd-dev \
97
+ pkg-config
98
+
99
+ install_packages_with_retry gcc-12 g++-12 && \
100
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 && \
101
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
102
+
103
+ # Install the new cuda-keyring package
74
104
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
75
105
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.1-1_all.deb
76
106
sudo dpkg -i cuda-keyring_1.1-1_all.deb
77
-
78
107
with_retry 3 10s sudo apt-get update
108
+
109
+ # Install the NVIDIA driver
79
110
install_packages_with_retry cuda-drivers-550
80
111
81
112
# Check if NVIDIA module is loaded, if not load it
@@ -97,14 +128,29 @@ nvidia-smi
97
128
Version : "123.4.5" ,
98
129
},
99
130
expectedOutput : `
100
-
101
- sudo apt-get update
102
- install_packages_with_retry linux-headers-$(uname -r)
131
+ # Install Dependencies
132
+ with_retry 3 10s sudo apt-get update
133
+ install_packages_with_retry linux-headers-$(uname -r) gcc make
134
+ install_packages_with_retry apt-utils build-essential \
135
+ ca-certificates \
136
+ curl \
137
+ kmod \
138
+ file \
139
+ libelf-dev \
140
+ libglvnd-dev \
141
+ pkg-config
142
+
143
+ install_packages_with_retry gcc-12 g++-12 && \
144
+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 && \
145
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12
146
+
147
+ # Install the new cuda-keyring package
103
148
distribution=$(. /etc/os-release;echo $ID$VERSION_ID | sed -e 's/\.//g')
104
149
wget https://developer.download.nvidia.com/compute/cuda/repos/$distribution/x86_64/cuda-keyring_1.1-1_all.deb
105
150
sudo dpkg -i cuda-keyring_1.1-1_all.deb
106
-
107
151
with_retry 3 10s sudo apt-get update
152
+
153
+ # Install the NVIDIA driver
108
154
install_packages_with_retry cuda-drivers=123.4.5
109
155
110
156
# Check if NVIDIA module is loaded, if not load it
0 commit comments