Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
damonmaria committed Apr 2, 2019
1 parent 9c683db commit 8465d2a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
String $nvidia_docker2_version = latest,
) {

# REVISIT: Want to require docker but causes circular dependencies
include apt

$distribution = "${$facts['operatingsystem'].downcase}${$facts['operatingsystemmajrelease']}"
$cuda_repo = "https://developer.download.nvidia.com/compute/cuda/repos/${regsubst($distribution, '\.', '', 'G')}
/x86_64"
$distribution_no_dot = regsubst($distribution, '\.', '', 'G')
$cuda_arch = $facts['architecture'] ? {
'amd64' => 'x86_64',
default => $facts['architecture'],
}
$cuda_repo = "https://developer.download.nvidia.com/compute/cuda/repos/${$distribution_no_dot}/${cuda_arch}"

$linux_headers_package = "linux-headers-${$facts['kernelrelease']}"
package { ['build-essential', $linux_headers_package]:
Expand Down

0 comments on commit 8465d2a

Please sign in to comment.