Skip to content

Commit

Permalink
New example definition file, rockylinux-mofed
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathon Anderson <[email protected]>
  • Loading branch information
anderbubble committed Dec 14, 2023
1 parent 1e64182 commit e04f987
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Example container definitions

The container definitions in the directory aren't built as containers published
by Warewulf for some reason.
Typical reasons may include:

* The resultant container would be too large.
* The definition is too specific to be broadly useful, and covering a wide enough set of versions would be impractical.
* The definition uses software that may not be redistributed.
25 changes: 25 additions & 0 deletions examples/rockylinux-mofed/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ghcr.io/hpcng/warewulf-rockylinux:9.2

RUN dnf -y install \
gcc \
patch \
libtool \
lsof \
kernel-rpm-macros \
make \
rpm-build \
gdb-headless \
python3-devel \
elfutils-libelf-devel \
gcc-gfortran \
tk \
kernel-{core,devel,headers,modules-extra} \
perl-sigtrap \
numactl-libs \
tcsh \
&& dnf -y remove $(dnf repoquery --installonly --latest-limit=-1 -q) \
&& dnf clean all

RUN (cd /tmp && tar -xf /mnt/MLNX_OFED_LINUX-5.8-3.0.7.0-rhel9.2-x86_64.tgz) \
&& (cd /tmp/MLNX_OFED_LINUX-5.8-3.0.7.0-rhel9.2-x86_64 && ./mlnxofedinstall --distro rhel9.2 --skip-repo --kernel $(rpm -q kernel-core --qf '%{version}-%{release}.%{arch}\n' | tail -n 1) --add-kernel-support --hpc) \
&& rm -rf /tmp/MLNX_OFED_LINUX*
13 changes: 13 additions & 0 deletions examples/rockylinux-mofed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Rocky Linux with the Mellanox OFED

This container definition demonstrates building a Rocky Linux based container incorporating the Mellanox OFED for InfiniBand support.

This definition requires that the Mellanox OFED downloadable for the desired version be placed in the `rockylinux-mofed` directory.
Download the `.tgz` version from https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/

With that in place, the container may be built with Podman as here:

```shell

podman build --volume $(readlink -f rockylinux-mofed):/mnt:ro --file rockylinux-mofed/Containerfile rockylinux-mofed/
```

0 comments on commit e04f987

Please sign in to comment.