Skip to content

Commit f4fd353

Browse files
committed
Adds nvidia-vgpu element
This element is for baking in the configuration needed to correctly license the VGPU.
1 parent 13a944e commit f4fd353

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

elements/nvidia-vgpu/README.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
===========
2+
nvidia-vgpu
3+
===========
4+
5+
* Configures client token for license server
6+
* Sets license type to VGPU
7+
8+
`DIB_NVIDIA_VGPU_CLIENT_TOKEN`: Contents of license file. This can be exported from the
9+
license server.
10+
11+
For example:
12+
13+
.. code-block::
14+
15+
export DIB_NVIDIA_VGPU_CLIENT_TOKEN="{{ lookup('file', 'path/to/token/downloaded/from/license/server') }}'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
export NVIDIA_VGPU_CLIENT_TOKEN=${DIB_NVIDIA_VGPU_CLIENT_TOKEN:?"You must define DIB_NVIDIA_VGPU_CLIENT_TOKEN"}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
4+
set -x
5+
fi
6+
set -eu
7+
set -o pipefail
8+
9+
mkdir -p /etc/nvidia/ClientConfigToken/ || echo "Directory: /etc/nvidia/ClientConfigToken/ already exists, skipping"
10+
printf "$NVIDIA_VGPU_CLIENT_TOKEN" >> /etc/nvidia/ClientConfigToken/client.tok
11+
12+
sed -i 's/^FeatureType.*$/FeatureType=1/' /etc/nvidia/gridd.conf

0 commit comments

Comments
 (0)