Skip to content

Commit aff412c

Browse files
committed
Setup Nvidia Driver for G2 instance type
Setup Nvidia Driver to work with G2 instance type when DCV is enabled Signed-off-by: Luca Carrogu <[email protected]>
1 parent 77f592a commit aff412c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

recipes/dcv_config.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ def allow_gpu_acceleration
3232

3333
# Update the xorg.conf to set up NVIDIA drivers.
3434
# NOTE: --enable-all-gpus parameter is needed to support servers with more than one NVIDIA GPU.
35+
nvidia_xconfig_command = "nvidia-xconfig --preserve-busid --enable-all-gpus"
36+
if node['ec2']['instance_type'].start_with?("g2.")
37+
nvidia_xconfig_command = nvidia_xconfig_command + " --use-display-device=none"
38+
end
3539
execute "Set up Nvidia drivers for X configuration" do
3640
user 'root'
37-
command "nvidia-xconfig --preserve-busid --enable-all-gpus"
41+
command nvidia_xconfig_command
3842
end
3943

4044
# dcvgl package must be installed after NVIDIA and before starting up X

0 commit comments

Comments
 (0)