Files
openairinterface5g/docker/Dockerfile.build.fhi72.t2.ubuntu
Bartosz Podrygajlo 7b5baa5104 ci: Speedup fhi72 dockerfiles
Move COPY . . down in 7.2 dockerfiles. This layer doesn't cache well due to
changes in docker context, moving it down allows docker builder to cache other
layers that are not affected by the context.

Signed-off-by: Bartosz Podrygajlo <bartosz.podrygajlo@openairinterface.org>
2026-07-02 10:26:50 +02:00

60 lines
1.8 KiB
Docker

# 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 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
COPY . .
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/