Skip to content

Commit

Permalink
Merge pull request #66 from anderbubble/nvidia-installer
Browse files Browse the repository at this point in the history
Example container using the Nvidia .run installer
  • Loading branch information
anderbubble authored Jan 6, 2025
2 parents 9ed1301 + f185edb commit 55b7fb0
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/rockylinux-9-nvidia-installer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.run
5 changes: 5 additions & 0 deletions examples/rockylinux-9-nvidia-installer/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ghcr.io/warewulf/warewulf-rockylinux:9

RUN dnf -y install kernel-devel \
&& dnf clean all \
&& for dir in /usr/src/kernels/*; do /bin/sh /mnt/NVIDIA-Linux.run -X --ui=none --no-backup --no-questions --kernel-name=$(basename $dir); done
20 changes: 20 additions & 0 deletions examples/rockylinux-9-nvidia-installer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Rocky Linux with the Nvidia driver (.run installer)

This container definition demonstrates building a Rocky Linux based container
incorporating the Nvidia driver from the `.run` installer.

The container may be built with Podman.

```shell

podman build --volume <local .run installer>:/mnt/NVIDIA-Linux.run . --tag rockylinux-9-nvidia-installer
```

This can then be imported directly into Warewulf.

```
wwctl container import $(podman image mount rockylinux-9-nvidia-installer) rockylinux-9-nvidia-installer
podman image unmount rockylinux-9-nvidia-installer
```

The host that builds the container does _not_ need to have a GPU installed.

0 comments on commit 55b7fb0

Please sign in to comment.