Skip to content

Commit 293fc07

Browse files
authored
Merge pull request #55 from stackhpc/feature/vgpu
nvidia vgpu related elements
2 parents 13a944e + 90b507f commit 293fc07

File tree

9 files changed

+90
-0
lines changed

9 files changed

+90
-0
lines changed

elements/extra-repos/README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
===========
2+
extra-repos
3+
===========
4+
5+
Installs extra repos prior to package install
6+
7+
* ``DIB_EXTRA_REPOS`` A space separated list of repos to install
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
4+
set -x
5+
fi
6+
7+
set -euo pipefail
8+
9+
case "$DISTRO_NAME" in
10+
centos* | rhel* | rocky*)
11+
rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core
12+
for repo in ${DIB_EXTRA_REPOS:-}; do
13+
dnf config-manager --add-repo "$repo"
14+
done
15+
;;
16+
*)
17+
echo "Distro \"$DISTRO_NAME\" is not supported"
18+
exit 1
19+
;;
20+
esac
21+
22+
exit 0
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===================
2+
nvidia-cuda-samples
3+
===================
4+
5+
* Downloads and compiles NVIDIA's collection of `CUDA samples <https://github.com/NVIDIA/cuda-samples>`_ for demo purposes.
6+
7+
`DIB_NVIDIA_CUDA_SAMPLES_VERSION`: Git ref to checkout.
8+
9+
For example:
10+
11+
.. code-block::
12+
13+
# GIT TAG
14+
export DIB_NVIDIA_CUDA_SAMPLES_VERSION:v12.1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-installs
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
make:
2+
gcc:
3+
git:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
cd /opt
10+
git clone https://github.com/NVIDIA/cuda-samples
11+
cd cuda-samples
12+
git checkout "${DIB_NVIDIA_CUDA_SAMPLES_VERSION:-master}"
13+
make

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)