Skip to content

Commit

Permalink
Build and install libfabric, libxdp and libbpf (#188)
Browse files Browse the repository at this point in the history
* Build and install libfabric, libxdp and libbpf

Update codeql.yml, coverity.yml to include changes from ubuntu build:
- build and Install libfabric
- build and Install libxdp
- build and Install libbpf

* Added LIBFABRIC_DIR to Media_Proxy Dockerfile

* More updates to Dockerfile, packages:
- autoconf 
- automake
- autotools-dev
- libtool

Signed-off-by: Miłosz Linkiewicz <milosz.linkiewicz@intel.com>
  • Loading branch information
Mionsz authored Sep 16, 2024
1 parent 17c94a8 commit ebdaa7b
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 8 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
MTL_BUILD_DISABLE_PCAPNG: true
LIBFABRIC_DIR: /tmp/libfabric
XDP_VERSION: 5c88569dd15e55db678b897b8ea2a73aeaf956f4
XDP_DIR: /tmp/xdp
GRPC_VERSION: v1.58.0
GRPC_DIR: /tmp/grpc
PREFIX_DIR: /usr/local
Expand Down Expand Up @@ -66,11 +69,28 @@ jobs:
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
- name: 'Build and Install xdp and libbpf'
run: |
git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git "${XDP_DIR}" && \
pushd "${XDP_DIR}" && \
./configure && \
make -j$(nproc) && \
sudo make install && \
make -j$(nproc) -C "${XDP_DIR}/lib/libbpf/src" && \
sudo make -C "${XDP_DIR}/lib/libbpf/src" install && popd
- name: 'Build and Install libfabric'
run: |
git clone --depth 1 --branch v1.22.0 https://github.com/ofiwg/libfabric "${LIBFABRIC_DIR}" && \
pushd "${LIBFABRIC_DIR}" && \
./autogen.sh && ./configure && \
make -j$(nproc) && \
sudo make install && popd
- name: 'Install MTL'
run: |
git clone --depth 1 https://github.com/OpenVisualCloud/Media-Transport-Library.git imtl
cd imtl
./build.sh
pushd imtl && ./build.sh && popd
- name: 'Restore cached for gRPC build'
id: grpc-cache-restore
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
env:
BUILD_TYPE: Release
MTL_BUILD_DISABLE_PCAPNG: true
LIBFABRIC_DIR: /tmp/libfabric
XDP_VERSION: 5c88569dd15e55db678b897b8ea2a73aeaf956f4
XDP_DIR: /tmp/xdp
GRPC_VERSION: v1.58.0
GRPC_DIR: /tmp/grpc
PREFIX_DIR: /usr/local
Expand Down Expand Up @@ -41,11 +44,28 @@ jobs:
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
- name: 'Build and Install xdp and libbpf'
run: |
git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git "${XDP_DIR}" && \
pushd "${XDP_DIR}" && \
./configure && \
make -j$(nproc) && \
sudo make install && \
make -j$(nproc) -C "${XDP_DIR}/lib/libbpf/src" && \
sudo make -C "${XDP_DIR}/lib/libbpf/src" install && popd
- name: 'Build and Install libfabric'
run: |
git clone --depth 1 --branch v1.22.0 https://github.com/ofiwg/libfabric "${LIBFABRIC_DIR}" && \
pushd "${LIBFABRIC_DIR}" && \
./autogen.sh && ./configure && \
make -j$(nproc) && \
sudo make install && popd
- name: 'Install MTL'
run: |
git clone --depth 1 https://github.com/OpenVisualCloud/Media-Transport-Library.git imtl
cd imtl
./build.sh
pushd imtl && ./build.sh && popd
- name: 'Restore cached for gRPC build'
id: grpc-cache-restore
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
env:
BUILD_TYPE: Release
MTL_BUILD_DISABLE_PCAPNG: true
LIBFABRIC_DIR: /tmp/libfabric
XDP_VERSION: 5c88569dd15e55db678b897b8ea2a73aeaf956f4
XDP_DIR: /tmp/xdp
GRPC_VERSION: v1.58.0
GRPC_DIR: /tmp/grpc
PREFIX_DIR: /usr/local
Expand Down Expand Up @@ -46,12 +49,28 @@ jobs:
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/*
- name: 'Build and Install xdp and libbpf'
run: |
git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git "${XDP_DIR}" && \
pushd "${XDP_DIR}" && \
./configure && \
make -j$(nproc) && \
sudo make install && \
make -j$(nproc) -C "${XDP_DIR}/lib/libbpf/src" && \
sudo make -C "${XDP_DIR}/lib/libbpf/src" install && popd
- name: 'Build and Install libfabric'
run: |
git clone --depth 1 --branch v1.22.0 https://github.com/ofiwg/libfabric "${LIBFABRIC_DIR}" && \
pushd "${LIBFABRIC_DIR}" && \
./autogen.sh && ./configure && \
make -j$(nproc) && \
sudo make install && popd
- name: 'Install MTL'
run: |
git clone --depth 1 https://github.com/OpenVisualCloud/Media-Transport-Library.git imtl
pushd imtl
./build.sh
popd
pushd imtl && ./build.sh && popd
- name: 'Restore cached for gRPC build'
id: grpc-cache-restore
Expand Down
12 changes: 11 additions & 1 deletion media-proxy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG GRPC_DIR="/opt/grpc"
# JPEGXS_VER Release v0.9
ARG JPEGXS_VER="e1030c6c8ee2fb05b76c3fa14cccf8346db7a1fa"
ARG JPEGXS_DIR="/opt/jpegxs"
ARG LIBFABRIC_DIR="/opt/libfabric"

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="Europe/Warsaw"
Expand All @@ -36,7 +37,8 @@ RUN apt-get update --fix-missing && \
libnuma-dev libjson-c-dev libpcap-dev libgtest-dev \
libsdl2-dev libsdl2-ttf-dev libssl-dev ca-certificates \
m4 clang llvm zlib1g-dev libelf-dev libcap-ng-dev \
gcc-multilib systemtap-sdt-dev librdmacm-dev libfdt-dev && \
gcc-multilib systemtap-sdt-dev librdmacm-dev \
libfdt-dev autoconf automake autotools-dev libtool && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -48,6 +50,7 @@ RUN git config --global user.email "milosz.linkiewicz@intel.com" && \
git -C ${MTL_DIR} checkout ${MTL_VER} && \
git clone --branch v${DPDK_VER} --depth 1 https://github.com/DPDK/dpdk.git ${DPDK_DIR} && \
git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git ${XDP_DIR} && \
git clone --depth 1 --branch v1.22.0 https://github.com/ofiwg/libfabric ${LIBFABRIC_DIR} && \
git clone --branch ${GPRC_VER} --recurse-submodules --depth 1 --shallow-submodules https://github.com/grpc/grpc ${GRPC_DIR} && \
git clone https://github.com/OpenVisualCloud/SVT-JPEG-XS ${JPEGXS_DIR} && \
git -C ${JPEGXS_DIR} checkout ${JPEGXS_VER} && \
Expand All @@ -63,6 +66,13 @@ RUN ./configure && \
make -C "${XDP_DIR}/lib/libbpf/src" install && \
DESTDIR="${PREFIX_DIR}" make -C "${XDP_DIR}/lib/libbpf/src" install

WORKDIR ${LIBFABRIC_DIR}
RUN ./autogen.sh && \
./configure && \
make -j$(nproc) && \
make install && \
DESTDIR="${PREFIX_DIR}" make install

# Build the DPDK
WORKDIR ${DPDK_DIR}
RUN meson setup build && \
Expand Down

0 comments on commit ebdaa7b

Please sign in to comment.