Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MOFED examples #62

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/rockylinux-mofed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tgz
26 changes: 26 additions & 0 deletions examples/rockylinux-mofed/Containerfile-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ghcr.io/warewulf/warewulf-rockylinux:8.10

ARG MOFED_TGZ

RUN dnf -y install \
kernel-{core,devel,headers,modules-extra} \
autoconf \
patch \
libtool \
rpm-build \
kernel-rpm-macros \
gdb-headless \
automake \
gcc-gfortran \
tcl \
tk \
libnl3 \
lsof \
numactl-libs \
python36 \
&& dnf -y remove $(dnf repoquery --installonly --latest-limit=-1 -q) \
&& dnf clean all

RUN (cd /tmp && tar -xf /mnt/$MOFED_TGZ) \
&& (cd /tmp/MLNX_OFED_LINUX* && ./mlnxofedinstall --distro rhel8.10 --skip-repo --kernel $(rpm -q kernel-core --qf '%{version}-%{release}.%{arch}\n' | tail -n 1) --add-kernel-support --hpc --without-fw-update) \
&& rm -rf /tmp/MLNX_OFED_LINUX* /etc/machine-id
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/warewulf/warewulf-rockylinux:9.2
FROM ghcr.io/warewulf/warewulf-rockylinux:9.4

ARG MOFED_TGZ

RUN dnf -y install \
gcc \
Expand All @@ -12,6 +14,7 @@ RUN dnf -y install \
python3-devel \
elfutils-libelf-devel \
gcc-gfortran \
libnl3 \
tk \
kernel-{core,devel,headers,modules-extra} \
perl-sigtrap \
Expand All @@ -20,6 +23,6 @@ RUN dnf -y install \
&& 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*
RUN (cd /tmp && tar -xf /mnt/$MOFED_TGZ) \
&& (cd /tmp/MLNX_OFED_LINUX* && ./mlnxofedinstall --distro rhel9.4 --skip-repo --kernel $(rpm -q kernel-core --qf '%{version}-%{release}.%{arch}\n' | tail -n 1) --add-kernel-support --hpc --without-fw-update) \
&& rm -rf /tmp/MLNX_OFED_LINUX* /etc/machine-id
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ This container definition demonstrates building a Rocky Linux based container
incorporating the Mellanox OFED for InfiniBand support.

This definition requires that the [Mellanox OFED .tgz][1] for the desired
version be placed in the `rockylinux-9-mofed` directory.
version be placed in the `rockylinux-8-mofed` directory.

[1]: https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/

With that in place, the container may be built with Podman.

For Rocky Linux 8.10 (aarch64):

```shell

podman build . --volume $PWD:/mnt:ro --file Containerfile
podman build . --volume $PWD:/mnt:ro --build-arg MOFED_TGZ=MLNX_OFED_LINUX-24.10-0.7.0.0-rhel8.10-aarch64.tgz --file Containerfile-8
```

For Rocky Linux 9.4 (aarch64):

```shell
podman build . --volume $PWD:/mnt:ro --build-arg MOFED_TGZ=MLNX_OFED_LINUX-24.10-0.7.0.0-rhel9.4-aarch64.tgz --file Containerfile-9
```
Loading