-
Notifications
You must be signed in to change notification settings - Fork 9
nvidia vgpu related elements #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f4fd353
Adds nvidia-vgpu element
jovial 681fbba
Adds nvidia-cuda-samples element
jovial 3a8dbaa
Adds extra-repos element
jovial b870862
Update elements/nvidia-vgpu/README.rst
jovial 90b507f
Update elements/nvidia-cuda-samples/README.rst
markgoddard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
=========== | ||
extra-repos | ||
=========== | ||
|
||
Installs extra repos prior to package install | ||
|
||
* ``DIB_EXTRA_REPOS`` A space separated list of repos to install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then | ||
set -x | ||
fi | ||
|
||
set -euo pipefail | ||
|
||
case "$DISTRO_NAME" in | ||
centos* | rhel* | rocky*) | ||
rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core | ||
for repo in ${DIB_EXTRA_REPOS:-}; do | ||
dnf config-manager --add-repo "$repo" | ||
done | ||
;; | ||
*) | ||
echo "Distro \"$DISTRO_NAME\" is not supported" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
=================== | ||
nvidia-cuda-samples | ||
=================== | ||
|
||
* Downloads and compiles NVIDA's collection of `CUDA samples <https://github.com/NVIDIA/cuda-samples>`_ for demo purposes. | ||
|
||
`DIB_NVIDIA_CUDA_SAMPLES_VERSION`: Git ref to checkout. | ||
|
||
For example: | ||
|
||
.. code-block:: | ||
|
||
# GIT TAG | ||
export DIB_NVIDIA_CUDA_SAMPLES_VERSION:v12.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-installs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
make: | ||
gcc: | ||
git: |
13 changes: 13 additions & 0 deletions
13
elements/nvidia-cuda-samples/post-install.d/99-cuda-samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then | ||
set -x | ||
fi | ||
set -eu | ||
set -o pipefail | ||
|
||
cd /opt | ||
git clone https://github.com/NVIDIA/cuda-samples | ||
cd cuda-samples | ||
git checkout "${DIB_NVIDIA_CUDA_SAMPLES_VERSION:-master}" | ||
make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=========== | ||
nvidia-vgpu | ||
=========== | ||
|
||
* Configures client token for license server | ||
* Sets license type to VGPU | ||
|
||
`DIB_NVIDIA_VGPU_CLIENT_TOKEN`: Contents of license file. This can be exported from the | ||
license server. | ||
|
||
For example: | ||
|
||
.. code-block:: | ||
|
||
export DIB_NVIDIA_VGPU_CLIENT_TOKEN="{{ lookup('file', 'path/to/token/downloaded/from/license/server') }}' | ||
jovial marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
export NVIDIA_VGPU_CLIENT_TOKEN=${DIB_NVIDIA_VGPU_CLIENT_TOKEN:?"You must define DIB_NVIDIA_VGPU_CLIENT_TOKEN"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then | ||
set -x | ||
fi | ||
set -eu | ||
set -o pipefail | ||
|
||
mkdir -p /etc/nvidia/ClientConfigToken/ || echo "Directory: /etc/nvidia/ClientConfigToken/ already exists, skipping" | ||
printf "$NVIDIA_VGPU_CLIENT_TOKEN" >> /etc/nvidia/ClientConfigToken/client.tok | ||
|
||
sed -i 's/^FeatureType.*$/FeatureType=1/' /etc/nvidia/gridd.conf |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.