Skip to content

Commit

Permalink
Example Rocky Linux containers including the Nvidia driver
Browse files Browse the repository at this point in the history
Closes #31

Signed-off-by: Jonathon Anderson <[email protected]>
  • Loading branch information
anderbubble committed May 3, 2024
1 parent 13db06a commit 3c694bb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/rockylinux-8-nvidia/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/hpcng/warewulf-rockylinux:8

RUN dnf -y install epel-release \
&& dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel8/$(arch)/cuda-rhel8.repo \
&& dnf -y install kernel-{core,devel,headers,modules-extra} \
&& dnf -y remove $(dnf repoquery --installonly --latest-limit=-1 -q) \
&& dnf -y module install nvidia-driver:520-dkms \
&& dnf clean all

RUN for module in $(dkms status | grep -o '^[^:]*'); do for kernel in $(cd /lib/modules; ls); do dkms build ${module} -k ${kernel}; done; done
10 changes: 10 additions & 0 deletions examples/rockylinux-9-nvidia/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/hpcng/warewulf-rockylinux:9

RUN dnf -y install epel-release \
&& dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/repos/rhel9/$(arch)/cuda-rhel9.repo \
&& dnf -y install kernel-{core,devel,headers,modules-extra} \
&& dnf -y remove $(dnf repoquery --installonly --latest-limit=-1 -q) \
&& dnf -y module install nvidia-driver:520-dkms \
&& dnf clean all

RUN for module in $(dkms status | grep -o '^[^:]*'); do for kernel in $(cd /lib/modules; ls); do dkms build ${module} -k ${kernel}; done; done

0 comments on commit 3c694bb

Please sign in to comment.