Skip to content

Commit

Permalink
Example Rocky Linux container 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 d89efe8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/rockylinux-9-nvidia/Containerfile
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
13 changes: 13 additions & 0 deletions examples/rockylinux-9-nvidia/README.md
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.

0 comments on commit d89efe8

Please sign in to comment.