Skip to content

Commit

Permalink
Merge pull request #45 from anderbubble/nvidia
Browse files Browse the repository at this point in the history
Example Rocky Linux containers including the Nvidia driver
  • Loading branch information
anderbubble authored May 3, 2024
2 parents 13db06a + d89efe8 commit 5d95048
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 5d95048

Please sign in to comment.