-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include Ubuntu NVIDIA dependencies to CI.
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
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,16 @@ | ||
# This action installs required Ubuntu NVIDIA dependencies. | ||
# It assumes that `nvidia-smi` is available on the system. | ||
name: "Install GPU Dependencies" | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install GPU Dependencies | ||
shell: bash | ||
run: | | ||
NVIDIA_SMI_OUTPUT=$(nvidia-smi) | ||
FULL_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K[\d.]+') | ||
MAJOR_DRIVER_VERSION=$(echo "$NVIDIA_SMI_OUTPUT" | grep -oP 'Driver Version:\s+\K\d+') | ||
UBUNTU_PACKAGE_SUFFIX="${MAJOR_DRIVER_VERSION}=${FULL_DRIVER_VERSION}-0ubuntu1" | ||
sudo apt-get update | ||
sudo apt-get install -y libnvidia-common-${UBUNTU_PACKAGE_SUFFIX} | ||
sudo apt-get install -y libnvidia-gl-${UBUNTU_PACKAGE_SUFFIX} |
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