-
Notifications
You must be signed in to change notification settings - Fork 21
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
Generalize VGPU drivers installation #93
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7cd727f
Add cloud provide and region to static fact template
cmd-ntrf 15fee35
Replace List by Array
cmd-ntrf 50f490c
Fix arbutus hieradata
cmd-ntrf 410ebce
Add missing quote
cmd-ntrf 7650a48
Fix source for vgpu repo in arbutus
cmd-ntrf 2ee6563
Decompose vgpu install
cmd-ntrf 696a14e
Move dkms dependency up
cmd-ntrf c403153
Add class to install nvidia vgpu driver from bin installer
cmd-ntrf 473b463
Add hieradata for openstack jusuf-cloud
cmd-ntrf ec21ef3
Fix vgpu package name
cmd-ntrf 7d53a36
Fix split command
cmd-ntrf 9fca4a3
Add missing include for vgpu and bin
cmd-ntrf 6042478
Fix jusuf-cloud gridd source key in hieradata
cmd-ntrf 4ae44db
Move gpu driver dependencies higher up
cmd-ntrf d763b07
Make sure installer succeeds
bc36283
Add explicit requirement on dkms and kernel-devel
cmd-ntrf 8664e64
Do not execute dkms autoinstall with vgpu binary
cmd-ntrf 54ea3ec
Refactor nvidia symlink creation
cmd-ntrf 9e8bbc9
Make gpu symlink location configurable
cmd-ntrf 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 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,6 @@ | ||
profile::gpu::install::vgpu::installer: rpm | ||
profile::gpu::install::vgpu::rpm::source: http://repo.arbutus.cloud.computecanada.ca/pulp/repos/centos/arbutus-cloud-vgpu-repo.el%{facts.os.release.major}.noarch.rpm | ||
profile::gpu::install::vgpu::rpm::packages: | ||
- nvidia-vgpu-kmod | ||
- nvidia-vgpu-gridd | ||
- nvidia-vgpu-tools |
This file contains 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 @@ | ||
profile::gpu::install::vgpu::installer: bin | ||
profile::gpu::install::vgpu::bin::source: https://hpsrepo.fz-juelich.de/jusuf/nvidia/NVIDIA-Driver.latest | ||
profile::gpu::install::vgpu::bin::gridd_source: https://hpsrepo.fz-juelich.de/jusuf/nvidia/gridd.conf |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/bin/sh | ||
PROCESSOR=$(uname -p) | ||
VERSION="$(source /etc/os-release; echo $VERSION_ID)" | ||
PACKAGE="cuda-drivers" | ||
PACKAGE_REGEX="${PACKAGE}-\([0-9.]\{1,\}\)[-0-9]*\.${PROCESSOR}" | ||
DRIVER_VERSION=$(test -f /usr/sbin/dkms && /usr/sbin/dkms status | grep -m 1 -Po 'nvidia, \K(\d+.\d+[\.]\d*)') | ||
# If that didn't work let's try nvidia-smi | ||
if [ -z $DRIVER_VERSION ]; then | ||
DRIVER_VERSION=$(if [ -x "$(command -v nvidia-smi)" ]; then nvidia-smi --query-gpu=driver_version --format=csv,noheader; fi) | ||
if [ -e /proc/driver/nvidia ]; then | ||
DRIVER_VERSION=$(grep -m 1 -Po 'NVRM version:.* \K(\d+\.\d+\.\d+)' /proc/driver/nvidia/version) | ||
fi | ||
if [ -z $DRIVER_VERSION ]; then | ||
BASE_URL="http://developer.download.nvidia.com/compute/cuda/repos" | ||
CUDA_REPO_GZ=$(curl -s ${BASE_URL}/rhel${VERSION}/${PROCESSOR}/repodata/repomd.xml | sed '2 s/xmlns=".*"//g' | xmllint --xpath 'string(/repomd/data[@type="primary"]/location/@href)' -) | ||
DRIVER_VERSION=$(curl -s ${BASE_URL}/rhel${VERSION}/${PROCESSOR}/${CUDA_REPO_GZ} | gunzip | sed -n "s/^.*\"${PACKAGE_REGEX}\.rpm\".*$/\1/p" | sort -V | tail -n1) | ||
fi | ||
echo "{ 'nvidia_driver_version' : '${DRIVER_VERSION}' }" | ||
echo "{ 'nvidia_driver_version' : '${DRIVER_VERSION}' }" |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something wrong with this because it is not catching this requirement:
It is installing
kernel-devel
but not recognising that thedkms
requirement is not met.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later I see
dkms
being installed (which brings ingcc
), so the second time around things will succeedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strategy shift: I have added an explicit requirement on
dkms
andkernel-devel
package on theExec[vgpu-driver-install-bin]
resource and removed thedeps
class.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed, that works, the drivers get installed at the right time.