Skip to content

Commit

Permalink
Refresh NVIDIA apt keys
Browse files Browse the repository at this point in the history
  • Loading branch information
damonmaria committed Jan 28, 2021
1 parent 0923a7b commit 9800eb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@
include apt
include docker

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

$cuda_driver_dependencies = ['build-essential', "linux-headers-${$facts[kernelrelease]}"]
ensure_packages($cuda_driver_dependencies)

apt::key { 'AE09FE4BBD223A84B2CCFCE3F60F4B3D7FA2AF80':
ensure => refreshed,
source => "${cuda_repo}/7fa2af80.pub",
}
-> apt::source { 'cuda':
Expand All @@ -48,6 +49,7 @@
# No need to trigger here has should touch /var/run/reboot-required which unattended-upgrades will pick up on

apt::key { 'C95B321B61E88C1809C4F759DDCAE044F796ECB0':
ensure => refreshed,
source => 'https://nvidia.github.io/nvidia-docker/gpgkey',
}
-> ['libnvidia-container', 'nvidia-container-runtime', 'nvidia-docker'].map |$source| {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mindhive-nvidia_docker_runtime",
"version": "2.2.1",
"version": "2.2.2",
"author": "[email protected]",
"summary": "Manage NVIDIA Docker runtime",
"license": "MIT",
Expand Down

0 comments on commit 9800eb1

Please sign in to comment.