Skip to content

Commit

Permalink
Merge pull request #566 from ArangoGutierrez/gfd_docs
Browse files Browse the repository at this point in the history
Migrate GPU feature discovery docs
  • Loading branch information
elezar authored Apr 16, 2024
2 parents df0dad0 + 9a780e5 commit 6d9218f
Show file tree
Hide file tree
Showing 2 changed files with 380 additions and 25 deletions.
48 changes: 23 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@
- [Updating Per-Node Configuration With a Node Label](#updating-per-node-configuration-with-a-node-label)
+ [Setting other helm chart values](#setting-other-helm-chart-values)
+ [Deploying with gpu-feature-discovery for automatic node labels](#deploying-with-gpu-feature-discovery-for-automatic-node-labels)
<!--
TODO: We are still in the process of migrating GFD to this repo. Once this is ready we can uncomment this section.
+ [Deploying gpu-feature-discovery in standalone mode](#deploying-gpu-feature-discovery-in-standalone-mode)
-->
* [Deploying via `helm install` with a direct URL to the `helm` package](#deploying-via-helm-install-with-a-direct-url-to-the-helm-package)
- [Building and Running Locally](#building-and-running-locally)
- [Changelog](#changelog)
Expand All @@ -42,13 +39,14 @@ The NVIDIA device plugin for Kubernetes is a Daemonset that allows you to automa
- Run GPU enabled containers in your Kubernetes cluster.

This repository contains NVIDIA's official implementation of the [Kubernetes device plugin](https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/).
As of v0.15.0 this repository also holds the implementation for GPU Feature Discovery labels,
for further information on GPU Feature Discovery see [here](docs/gpu-feature-discovery/README.md).

Please note that:
- The NVIDIA device plugin API is beta as of Kubernetes v1.10.
- The NVIDIA device plugin is currently lacking
- Comprehensive GPU health checking features
- GPU cleanup features
- ...
- Support will only be provided for the official NVIDIA device plugin (and not
for forks or other variants of this plugin).

Expand Down Expand Up @@ -560,11 +558,11 @@ $ helm repo add nvdp https://nvidia.github.io/k8s-device-plugin
$ helm repo update
```

Then verify that the latest release (`v0.14.5`) of the plugin is available:
Then verify that the latest release (`v0.15.0`) of the plugin is available:
```
$ helm search repo nvdp --devel
NAME CHART VERSION APP VERSION DESCRIPTION
nvdp/nvidia-device-plugin 0.14.5 0.14.5 A Helm chart for ...
nvdp/nvidia-device-plugin 0.15.0 0.15.0 A Helm chart for ...
```

Once this repo is updated, you can begin installing packages from it to deploy
Expand All @@ -575,7 +573,7 @@ The most basic installation command without any options is then:
helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--namespace nvidia-device-plugin \
--create-namespace \
--version 0.14.5
--version 0.15.0
```

**Note:** You only need the to pass the `--devel` flag to `helm search repo`
Expand All @@ -584,7 +582,7 @@ version (e.g. `<version>-rc.1`). Full releases will be listed without this.

### Configuring the device plugin's `helm` chart

The `helm` chart for the latest release of the plugin (`v0.14.5`) includes
The `helm` chart for the latest release of the plugin (`v0.15.0`) includes
a number of customizable values.

Prior to `v0.12.0` the most commonly used values were those that had direct
Expand All @@ -594,7 +592,7 @@ case of the original values is then to override an option from the `ConfigMap`
if desired. Both methods are discussed in more detail below.

The full set of values that can be set are found here:
[here](https://github.com/NVIDIA/k8s-device-plugin/blob/v0.14.5/deployments/helm/nvidia-device-plugin/values.yaml).
[here](https://github.com/NVIDIA/k8s-device-plugin/blob/v0.15.0/deployments/helm/nvidia-device-plugin/values.yaml).

#### Passing configuration to the plugin via a `ConfigMap`.

Expand Down Expand Up @@ -633,7 +631,7 @@ EOF
And deploy the device plugin via helm (pointing it at this config file and giving it a name):
```
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set-file config.map.config=/tmp/dp-example-config0.yaml
Expand All @@ -655,7 +653,7 @@ $ kubectl create cm -n nvidia-device-plugin nvidia-plugin-configs \
```
```
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set config.name=nvidia-plugin-configs
Expand Down Expand Up @@ -683,7 +681,7 @@ EOF
And redeploy the device plugin via helm (pointing it at both configs with a specified default).
```
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set config.default=config0 \
Expand All @@ -702,7 +700,7 @@ $ kubectl create cm -n nvidia-device-plugin nvidia-plugin-configs \
```
```
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set config.default=config0 \
Expand Down Expand Up @@ -785,7 +783,7 @@ chart values that are commonly overridden are:
```

Please take a look in the
[`values.yaml`](https://github.com/NVIDIA/k8s-device-plugin/blob/v0.14.5/deployments/helm/nvidia-device-plugin/values.yaml)
[`values.yaml`](https://github.com/NVIDIA/k8s-device-plugin/blob/v0.15.0/deployments/helm/nvidia-device-plugin/values.yaml)
file to see the full set of overridable parameters for the device plugin.

Examples of setting these options include:
Expand All @@ -794,7 +792,7 @@ Enabling compatibility with the `CPUManager` and running with a request for
100ms of CPU time and a limit of 512MB of memory.
```shell
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set compatWithCPUManager=true \
Expand All @@ -805,7 +803,7 @@ $ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
Enabling compatibility with the `CPUManager` and the `mixed` `migStrategy`
```shell
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set compatWithCPUManager=true \
Expand All @@ -824,7 +822,7 @@ Discovery to perform this labeling.
To enable it, simply set `gfd.enabled=true` during helm install.
```
helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version=0.14.5 \
--version=0.15.0 \
--namespace nvidia-device-plugin \
--create-namespace \
--set gfd.enabled=true
Expand Down Expand Up @@ -866,8 +864,7 @@ product name, e.g.:
```
nvidia.com/gpu.product = A100-SXM4-40GB-MIG-1g.5gb-SHARED
```
<!--
TODO: We are still in the process of migrating GFD to this repo. Once this is ready we can uncomment this section.

#### Deploying gpu-feature-discovery in standalone mode

As of `v0.15.0`, the device plugin's helm chart has integrated support to deploy
Expand All @@ -894,6 +891,7 @@ Once this repo is updated, you can begin installing packages from it to deploy
the `gpu-feature-discovery` component in standalone mode.

The most basic installation command without any options is then:

```
$ helm upgrade -i nvdp nvdp/nvidia-device-plugin \
--version 0.15.0 \
Expand Down Expand Up @@ -930,31 +928,31 @@ Using the default values for the flags:
$ helm upgrade -i nvdp \
--namespace nvidia-device-plugin \
--create-namespace \
https://nvidia.github.io/k8s-device-plugin/stable/nvidia-device-plugin-0.14.5.tgz
https://nvidia.github.io/k8s-device-plugin/stable/nvidia-device-plugin-0.15.0.tgz
```
-->

## Building and Running Locally

The next sections are focused on building the device plugin locally and running it.
It is intended purely for development and testing, and not required by most users.
It assumes you are pinning to the latest release tag (i.e. `v0.14.5`), but can
It assumes you are pinning to the latest release tag (i.e. `v0.15.0`), but can
easily be modified to work with any available tag or branch.

### With Docker

#### Build
Option 1, pull the prebuilt image from [Docker Hub](https://hub.docker.com/r/nvidia/k8s-device-plugin):
```shell
$ docker pull nvcr.io/nvidia/k8s-device-plugin:v0.14.5
$ docker tag nvcr.io/nvidia/k8s-device-plugin:v0.14.5 nvcr.io/nvidia/k8s-device-plugin:devel
$ docker pull nvcr.io/nvidia/k8s-device-plugin:v0.15.0
$ docker tag nvcr.io/nvidia/k8s-device-plugin:v0.15.0 nvcr.io/nvidia/k8s-device-plugin:devel
```

Option 2, build without cloning the repository:
```shell
$ docker build \
-t nvcr.io/nvidia/k8s-device-plugin:devel \
-f deployments/container/Dockerfile.ubuntu \
https://github.com/NVIDIA/k8s-device-plugin.git#v0.14.5
https://github.com/NVIDIA/k8s-device-plugin.git#v0.15.0
```

Option 3, if you want to modify the code:
Expand Down
Loading

0 comments on commit 6d9218f

Please sign in to comment.