Has anyone installed MLNX OFED into Centos 7.6 (not by using an old one premade from the docker hub)? Do you have a reference doc for the procedure?

Has anyone installed MLNX OFED into Centos 7.6 (not by using an old one premade from the docker hub)? Do you have a reference doc for the procedure?

The base images on the docker hub are out of date.

Following what docs I can find on here to make my own won’t complete.

The document links within the readmes on the docker images are broken.

Has there been any updated documentation on this procedure?

Thanks

//Note: this is community supplied - no guarantees!

//

// the docker how to is not overly helpful

https://docs.docker.com/develop/develop-images/baseimages/

// but they do reference a script

// The script can be used to make the centos image

// (there are also other distros also available in it… that’s on you to sort out)

https://github.com/moby/moby/blob/master/contrib/mkimage-yum.sh

//example usage - just does core package

mkimage.sh centos_core

// The following will provide information on how to

// modify that script to run with RHEL

https://www.ibm.com/developerworks/community/blogs/mhhaque/entry/How_to_create_RHEL7_Docker_Image_for_IBM_Power_System?lang=en

// NOTE the github script has to be edited!

// There is also a change that needs to match your repo hook

mkimage-yum.sh rhel_base

// with “cdrom” is the mounted ofed iso and “iso” is mounted linux distro iso

// once your image has been created, you can run it with

// (as an example)

docker run --privileged -i -t -v /mnt/cdrom:/mnt/cdrom -v /mnt/iso:/mnt/iso --net=host --device=/dev/infiniband/uverbs0 --device=/dev/infiniband/rdma_cm --gpus all redhat_base:7.6 bash

// From here, within your container, yum install “Infiniband Support” and try installing ofed.

// the --gpus all is really just if you have cuda loaded.

// Note the Host’s cuda has to be a later or equal version than that of the container’s cuda… but that’ off this topic… but be aware of it. The host has to have cuda loaded too!

// Once ofed is installed, follow its setup and diagnostics. should be able to manipulate the ports… ibdev2netdev… etc

Hi Andrew,

Based on this update, were you able to successfully install the OFED?

Thanks,

Namrata.

Hi,

using the below dockerfile I managed to build and run centos7.6 with latest GA MLNX_OFED

FROM centos:centos7.6.1810

ARG MOFED_VER=4.6-1.0.1.1

ENV MOFED_VER $MOFED_VER

ENV OS_VER rhel7.6

ENV PLATFORM x86_64

RUN yum install -y perl numactl-libs gtk2 atk cairo gcc-gfortran tcsh libnl3 tcl tk python-devel \

pciutils make lsof redhat-rpm-config rpm-build libxml2-python ethtool \

iproute net-tools openssh-clients git openssh-server wget

&& git clone https://github.com/esnet/iperf.git && cd iperf && ./configure --bindir=/usr/bin/ && make -j 8 && make install

WORKDIR /tmp/

RUN wget http://content.mellanox.com/ofed/MLNX_OFED-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}.tgz && \

tar -xf MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}.tgz && \

MLNX_OFED_LINUX-${MOFED_VER}-${OS_VER}-${PLATFORM}/mlnxofedinstall --user-space-only --without-fw-update --all --force \

&& rm -rf /tmp/

docker build -t mofed_centos7.6:4.6-1.0.1.1 --build-arg MOFED_VER=4.6-1.0.1.1 --no-cache --pull --rm --force-rm --compress -f centos7.6 .

docker run --privileged -dit --name mofed7.6 -h mofed_centsos7.6 mofed_centos7.6:4.6-1.0.1.1

​using the above with centos 7.6.1810 and its associated ofed yes

I have not yet tried it with the updated ofed from the end of sept 2019.