Skip to content

Commit 3bd2200

Browse files
francesco-giordanolukeseawalker
authored andcommitted
Add dkms nvidia override with AL2-kernel5
1 parent af5b5d4 commit 3bd2200

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MAKE[0]="'make' -j2 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=${kernelver} modules CC=/usr/bin/gcc10-gcc"

cookbooks/aws-parallelcluster-install/recipes/nvidia.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@
3232
action :uninstall
3333
end
3434

35+
# Amazon linux 2 with Kernel 5 need to set CC to /usr/bin/gcc10-gcc using dkms override
36+
if platform?('amazon') && node['kernel']['release'].split('.')[0].to_i == 5
37+
cookbook_file 'dkms/nvidia.conf' do
38+
source 'dkms/nvidia.conf'
39+
path '/etc/dkms/nvidia.conf'
40+
owner 'root'
41+
group 'root'
42+
mode '0644'
43+
end
44+
end
45+
3546
# Install NVIDIA driver
3647
bash 'nvidia.run advanced' do
3748
user 'root'

0 commit comments

Comments
 (0)