CI: Add XML and Dockerfile for FHI7.2 gNB with T2 support

Use taskset with a dynamic range based on the number of detected processors
for OAI and DPDK build. This ensures both DPDK and OAI build steps use all
available CPU cores on the machine.

Build with XRAN K release

Signed-off-by: Jaroslava Fiedlerova <jaroslava.fiedlerova@openairinterface.org>
This commit is contained in:
Jaroslava Fiedlerova
2025-07-10 14:08:46 +02:00
committed by Jaroslava Fiedlerova
parent c02c3daad9
commit 6a9b4b58a4
4 changed files with 171 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ from cls_ci_helper import archiveArtifact
# Helper functions used here and in other classes
# (e.g., cls_cluster.py)
#-----------------------------------------------------------
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-enb-asan', 'oai-gnb-asan', 'oai-lte-ue-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial', 'oai-gnb-fhi72']
IMAGES = ['oai-enb', 'oai-lte-ru', 'oai-lte-ue', 'oai-gnb', 'oai-nr-cuup', 'oai-gnb-aw2s', 'oai-nr-ue', 'oai-enb-asan', 'oai-gnb-asan', 'oai-lte-ue-asan', 'oai-nr-ue-asan', 'oai-nr-cuup-asan', 'oai-gnb-aerial', 'oai-gnb-fhi72', 'oai-gnb-fhi72-t2']
DEFAULT_REGISTRY = "gracehopper3-oai.sboai.cs.eurecom.fr"
def CreateWorkspace(host, sourcePath, repository, branch):
@@ -220,6 +220,10 @@ class Containerize():
imageNames.append(('oai-gnb', 'gNB', 'oai-gnb', ''))
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup', ''))
imageNames.append(('oai-nr-ue', 'nrUE', 'oai-nr-ue', ''))
result = re.search('fhi72-t2', self.imageKind)
if result is not None:
imageNames.append(('ran-build-fhi72-t2', 'build.fhi72.t2', 'ran-build-fhi72-t2', ''))
imageNames.append(('oai-gnb', 'gNB.fhi72.t2', 'oai-gnb-fhi72-t2', ''))
cmd.cd(lSourcePath)
@@ -298,6 +302,10 @@ class Containerize():
cmd.run(f'sed -i -e "s#ran-build:latest#ran-build:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
if image == 'oai-gnb-aerial':
cmd.run('cp -f /opt/nvidia-ipc/nvipc_src.2026.01.07.tar.gz .')
if image == 'ran-build-fhi72-t2':
cmd.run('cp -f /opt/t2-patch/AMD-T2-SDFEC_25-03-1.patch .')
if name == 'oai-gnb-fhi72-t2':
cmd.run(f'sed -i -e "s#ran-build-fhi72-t2:latest#ran-build-fhi72-t2:{imageTag}#" docker/Dockerfile.{pattern}{dockerfileprefix}')
logfile = f'{lSourcePath}/cmake_targets/log/{name}.docker.log'
option = option + f" --build-arg UBUNTU_IMAGE={DEFAULT_REGISTRY}/{ubuntuImage}"
ret = cmd.run(f'docker build --target {image} --tag {name}:{imageTag} --file docker/Dockerfile.{pattern}{dockerfileprefix} {option} . > {logfile} 2>&1', timeout=1200)
@@ -305,6 +313,8 @@ class Containerize():
log_files.append(t)
if image == 'oai-gnb-aerial':
cmd.run('rm -f nvipc_src.2026.01.07.tar.gz')
if image == 'ran-build-fhi72-t2':
cmd.run('rm -f AMD-T2-SDFEC_25-03-1.patch')
# check the status of the build
ret = cmd.run(f"docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' {name}:{imageTag}")
if ret.returncode != 0:

View File

@@ -0,0 +1,26 @@
<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->
<testCaseList>
<htmlTabRef>build-tab</htmlTabRef>
<htmlTabName>Build Images with T2 support</htmlTabName>
<htmlTabIcon>wrench</htmlTabIcon>
<testCase>
<class>Create_Workspace</class>
<desc>Create new Workspace for server 0</desc>
<node>stonechat</node>
</testCase>
<testCase>
<class>Build_Image</class>
<desc>Build Images with T2</desc>
<kind>fhi72-t2</kind>
<node>stonechat</node>
</testCase>
<testCase>
<class>Push_Local_Registry</class>
<desc>Push Images to Local Registry</desc>
<node>stonechat</node>
</testCase>
</testCaseList>

View File

@@ -0,0 +1,57 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface RAN Build for FHI 7.2
# Valid for UBUNTU 24.04
#
#---------------------------------------------------------------------
FROM ran-base:latest AS ran-base
ARG xran_VERSION=11.1.1
ARG DPDK_VERSION=22.11
ARG T2_PATCH=AMD-T2-SDFEC_25-03-1.patch
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
meson \
wget \
xz-utils \
pkg-config \
python3-pyelftools \
libnuma-dev && \
rm -rf /var/lib/apt/lists/*
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
## Copy T2 patch
COPY ./$T2_PATCH /opt/.
## Download and build DPDK
RUN wget http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.xz && \
tar -xvf dpdk-$DPDK_VERSION.tar.xz && \
cd dpdk-$DPDK_VERSION && \
patch -p1 < /opt/$T2_PATCH && \
meson build && \
taskset -c 0-$(grep ^processor /proc/cpuinfo | wc -l) ninja -C build && \
ninja install -C build
## Build Fronthaul library
RUN git clone https://github.com/openairinterface/o-du-phy.git /opt/phy && \
cd /opt/phy && \
git checkout $xran_VERSION &&\
cd /opt/phy/fhi_lib/lib && \
WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=/oai-ran/dpdk-$DPDK_VERSION/ XRAN_DIR=/opt/phy/fhi_lib make XRAN_LIB_SO=1
FROM ran-base AS ran-build-fhi72-t2
## Build and install OAI
## Run build_oai to build the target image, if T2 patch present, build with T2 support
RUN /bin/sh oaienv && \
taskset -c 0-$(grep ^processor /proc/cpuinfo | wc -l) \
cmake -B build/ -GNinja -DOAI_FHI72=ON \
-Dxran_LOCATION=/opt/phy/fhi_lib/lib \
-DENABLE_LDPC_AAL=ON && \
ninja -C build/

View File

@@ -0,0 +1,76 @@
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface 7.2 Fronthaul
# Valid for Ubuntu24.04
#
#---------------------------------------------------------------------
FROM ran-base:latest AS gnb-base
FROM ran-build-fhi72-t2:latest AS gnb-build
#start from scratch for target executable
FROM ubuntu:noble AS oai-gnb
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN apt-get update && \
apt-get upgrade --yes && \
apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
tzdata \
libconfig9 \
openssl \
net-tools \
gdb \
pciutils \
libpcap-dev \
libatomic1 \
libnuma-dev \
libyaml-cpp-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/build/nr-softmodem ./
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
COPY ./docker/scripts/check-prach-io.sh ./check-prach-io.sh
COPY --from=gnb-build \
/oai-ran/build/liboai_transpro.so \
/oai-ran/build/libcoding.so \
/oai-ran/build/libparams_libconfig.so \
/oai-ran/build/libdfts.so \
/oai-ran/build/libldpc*.so \
/oai-ran/build/libparams_yaml.so \
/usr/local/lib/
## Libxran library
COPY --from=gnb-build \
/opt/phy/fhi_lib/lib/build/libxran.so \
/opt/phy/fhi_lib/lib/build/
## Copy all DPDK libraries as liboran_fhlib_5g.so require most of them
COPY --from=gnb-build /usr/local/lib/x86_64-linux-gnu /usr/local/lib/x86_64-linux-gnu/
RUN ldconfig && \
echo "---- ldd on nr-softmodem ----" && \
ldd /opt/oai-gnb/bin/nr-softmodem && \
echo "---- ldd on shared libraries ----" && \
ldd /usr/local/lib/liboai_transpro.so \
/usr/local/lib/libcoding.so \
/usr/local/lib/libparams_libconfig.so \
/usr/local/lib/libdfts.so \
/usr/local/lib/libldpc*.so \
/opt/phy/fhi_lib/lib/build/libxran.so
WORKDIR /opt/oai-gnb
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem"]