Skip to content

Commit

Permalink
Change installed package from nvidia-docker2 to nvidia-container-toolkit
Browse files Browse the repository at this point in the history
damonmaria committed Feb 3, 2020
1 parent 4b110dc commit ba4e532
Showing 3 changed files with 52 additions and 8 deletions.
45 changes: 45 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->

## Table of Contents

**Classes**

* [`nvidia_docker_runtime`](#nvidia_docker_runtime): Allows the use of `docker run --runtime=nvidia ...`

## Classes

### nvidia_docker_runtime

Installs NVIDIA runtime for Docker and the required NVIDIA/CUDA drivers

Driver versions for CUDA versions: https://docs.nvidia.com/deploy/cuda-compatibility/index.html

#### Examples

#####

```puppet
include nvidia_docker_runtime
```

#### Parameters

The following parameters are available in the `nvidia_docker_runtime` class.

##### `driver_version`

Data type: `String`

NVIDIA/CUDA driver version, for exmaple: `418.40.04-1`. Use to lock down to a specific version. Default: `latest`

Default value: latest

##### `nvidia_container_toolkit_version`

Data type: `String`

NVIDIA container toolkit version, for example: `3.0.1`. Use to lock down to a specific version. Default: `latest`

Default value: latest

13 changes: 6 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -5,16 +5,16 @@
# @param driver_version
# NVIDIA/CUDA driver version, for exmaple: `418.40.04-1`. Use to lock down to a specific version. Default: `latest`
#
# @param nvidia_docker2_version
# NVIDIA Docker runtime version, for example: `2.0.3+docker18.09.4-1`. Use to lock down to a specific version. Default: `latest`
# @param nvidia_container_toolkit_version
# NVIDIA container toolkit version, for example: `3.0.1`. Use to lock down to a specific version. Default: `latest`
#
# Driver versions for CUDA versions: https://docs.nvidia.com/deploy/cuda-compatibility/index.html
#
# @example
# include nvidia_docker_runtime
class nvidia_docker_runtime (
String $driver_version = latest,
String $nvidia_docker2_version = latest,
String $driver_version = latest,
String $nvidia_container_toolkit_version = latest,
) {

include apt
@@ -56,15 +56,14 @@
}
}
~> Exec['apt_update']
-> package { 'nvidia-docker2':
ensure => $nvidia_docker2_version,
-> package { 'nvidia-container-toolkit':
ensure => $nvidia_container_toolkit_version,
require => Package['cuda-drivers'],
}
~> exec { 'restart docker':
command => 'pkill -SIGHUP dockerd',
path => '/usr/sbin:/usr/bin:/sbin:/bin',
refreshonly => true,
subscribe => Package['nvidia-docker2'],
}
}
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": "0.2.2",
"version": "1.0.0",
"author": "[email protected]",
"summary": "Manage NVIDIA Docker runtime",
"license": "MIT",

0 comments on commit ba4e532

Please sign in to comment.