-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from anderbubble/nvidia
Example Rocky Linux containers including the Nvidia driver
- Loading branch information
Showing
2 changed files
with
21 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,8 @@ | ||
FROM ghcr.io/hpcng/warewulf-rockylinux:9 | ||
|
||
RUN dnf -y install dnf-plugins-core epel-release kernel-headers \ | ||
&& dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(arch)/cuda-rhel9.repo \ | ||
&& dnf -y module install nvidia-driver:latest-dkms \ | ||
&& dnf clean all \ | ||
&& ls /lib/modules | xargs -n1 /usr/lib/dkms/dkms_autoinstaller start \ | ||
&& dkms status |
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,13 @@ | ||
# Rocky Linux with the Nvidia driver | ||
|
||
This container definition demonstrates building a Rocky Linux based container | ||
incorporating the Nvidia driver for Nvidia GPU support. | ||
|
||
The container may be built with Podman. | ||
|
||
```shell | ||
|
||
podman build . | ||
``` | ||
|
||
The host that builds the container does _not_ need to have a GPU installed. |