-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue HPCINFRA-1968: Compile with DOCA
Signed-off-by: Daniel Pressler <danielpr@nvidia.com>
- Loading branch information
Showing
9 changed files
with
303 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ARG ARCH=x86_64 | ||
FROM harbor.mellanox.com/hpcx/$ARCH/ubuntu22.04/core:latest | ||
ARG _UID=6213 | ||
ARG _GID=101 | ||
ARG _LOGIN=swx-jenkins | ||
ARG _HOME=/var/home/$_LOGIN | ||
ARG HTTP_NFS_ENDPOINT="http://nbu-nfs.mellanox.com" | ||
ARG DOCA_REPO_BUILD="/auto/sw/release/doca/doca-repo-x86/doca-repo-2.6.0/last_stable" | ||
ARG OS_NAME="ubuntu2204" | ||
ARG REPO_ARCH="amd64" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
sudo wget lynx unzip \ | ||
automake dh-make \ | ||
g++ make vim python3-pip curl \ | ||
git libglib2.0-dev \ | ||
cppcheck clang-tools clang-tidy \ | ||
net-tools psmisc \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN DOCA_REPO_LINK=$(lynx -dump -listonly ${HTTP_NFS_ENDPOINT}/${DOCA_REPO_BUILD} | awk '{ print $2 }' | grep doca-host | grep -iE ".rpm$|.deb$" | grep -iE "$OS_NAME.*$REPO_ARCH" || true) \ | ||
&& wget -q --no-check-certificate -O doca-repo.deb $DOCA_REPO_LINK \ | ||
&& apt-get -qq install -y ./doca-repo.deb \ | ||
&& apt-get -qq update \ | ||
&& mkdir -p /lib/modules \ | ||
&& apt-get -qq install -y --allow-downgrades ibacm ibacm infiniband-diags libibumad \ | ||
libibverbs-dev libibverbs1 libibverbs-dev librdmacm-dev flex \ | ||
librdmacm1 mlnx-ethtool mlnx-iproute2 mlnx-tools mstflint \ | ||
ofed-scripts rdma-core collectx-clxapi collectx-clxapidev \ | ||
python3-protobuf libgrpc-dev mlnx-dpdk-dev mlnx-dpdk \ | ||
ninja-build meson libjson-c-dev libjsoncpp-dev libzip-dev libgtest-dev \ | ||
build-essential | ||
|
||
RUN pip3 install -U pip --no-cache-dir \ | ||
&& pip3 install argparse --no-cache-dir | ||
|
||
# get ibdev2netdev for tests usage | ||
RUN git clone https://github.com/Mellanox/container_scripts.git && \ | ||
cp container_scripts/ibdev2netdev /usr/local/sbin/ && \ | ||
rm -rf container_scripts | ||
|
||
RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||
mkdir -p ${_HOME} && \ | ||
groupadd -f -g "$_GID" "$_LOGIN" && \ | ||
useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "${_LOGIN}" && \ | ||
chown -R ${_LOGIN} ${_HOME} && \ | ||
mkdir /build && chown -R ${_LOGIN} /build | ||
|
||
ENV MODULEPATH /hpc/local/etc/modulefiles | ||
USER "$_LOGIN" | ||
ENTRYPOINT [ "/bin/bash", "--login", "--rcfile", "/etc/bashrc", "-c" ] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.