Skip to content

Commit

Permalink
WIP: remove ofed from NDT plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyItkin committed Feb 19, 2024
1 parent c9e613d commit a09d6eb
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions plugins/UFM_NDT_Plugin/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM ubuntu:20.04 AS ndt_base_ubuntu20

ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ARG MOFED_VER=5.9-0.5.6.0
ARG MOFED_DIR=MLNX_OFED_LINUX-${MOFED_VER}-ubuntu20.04-x86_64

LABEL maintainer="[email protected]"
ARG _ARCH=x86_64
ARG _DIST=ubuntu20.04
ARG _OFED_VER=5.9-0.5.6.0
ARG OFED_URL=http://nbu-nfs.mellanox.com/auto/sw/release/mlnx_ofed/MLNX_OFED/MLNX_OFED_LINUX-${_OFED_VER}/MLNX_OFED_LINUX-${_OFED_VER}-${_DIST}-${_ARCH}/DEBS
ARG NDT_OFED_DEP="libibumad3 libibverbs1 ibverbs-providers "
ARG BASE_PATH=/opt/ufm/ufm_plugin_ndt

LABEL maintainer="[email protected]"
ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update && apt upgrade -y && apt-get -y install supervisor python3 python3-pip rsyslog mc wget cron logrotate vim libcap2 curl sudo

Expand All @@ -24,14 +25,15 @@ COPY config/ndt_httpd_proxy.conf config/ndt.conf config/ufm_plugin_ndt_httpd.con

RUN /ui_build.sh

RUN echo "wget -q https://content.mellanox.com/ofed/MLNX_OFED-${MOFED_VER}/${MOFED_DIR}.tgz"
# Install OFED
RUN wget -q https://content.mellanox.com/ofed/MLNX_OFED-${MOFED_VER}/${MOFED_DIR}.tgz && \
tar xf ${MOFED_DIR}.tgz && \
rm -f ${MOFED_DIR}.tgz && \
cd ${MOFED_DIR} && \
./mlnxofedinstall --without-fw-update --user-space-only --skip-distro-check --skip-unsupported-devices-check --force && \
cd ../ && \
rm -rf ${MOFED_DIR}
RUN echo "Download ibdiagnet (${NDT_OFED_DEP}}) from mofed (${_OFED_VER}}) repo" && \
mkdir /tmp/ofed_temp && pushd /tmp/ofed_temp && \
# mofed deb is not a proper repository so cannot be added as a repo but needs to be downloaded and installed manually \
for pkg in ${NDT_OFED_DEP}; do \
full_pkg_name=$(curl ${OFED_URL}/ 2>&1| sed -n "s/.*>\s*\(${pkg}_.*deb\)<.*/\1/p" ); \
curl ${OFED_URL}/${full_pkg_name} -O; \
done && \
apt-get install -y ./* && \
popd && \
rm -rf /tmp/ofed_temp

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

0 comments on commit a09d6eb

Please sign in to comment.