This commit is contained in:
2026-01-08 09:17:26 +00:00
parent 85fef10860
commit cf4ca86169
35 changed files with 2493 additions and 118 deletions
+56
View File
@@ -0,0 +1,56 @@
FROM ran-base:latest AS ran-build
ARG BUILD_OPTION
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -c --ninja \
--gNB --RU --nrUE -w SIMU\
--build-lib "telnetsrv" \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DKPM_VERSION=KPM_V3_00 --cmake-opt -DE2AP_VERSION=E2AP_V3 \
--noavx512 \
--build-tool-opt -k10 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
echo "---- ldd on executables ----" && \
ldd ran_build/build/*softmodem* ran_build/build/nr-cuup ran_build/build/oairu && \
echo "---- ldd on shared libraries ----" && \
ldd ran_build/build/*.so
RUN set -eux; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates curl wget iproute2 iputils-ping dnsutils jq \
iperf iperf3 ffmpeg gdb\
nghttp2-client || true; \
if ! command -v h2load >/dev/null 2>&1; then \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nghttp2 || true; \
fi; \
# Try to install sipp from apt; if unavailable, build from source
if apt-cache show sipp >/dev/null 2>&1; then \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sipp; \
else \
echo "sipp not in apt, building from source..."; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential cmake git libncurses5-dev libpcap-dev libssl-dev libpcre3-dev; \
git clone --depth=1 https://github.com/SIPp/sipp.git /tmp/sipp; \
cd /tmp/sipp; cmake -DENABLE_SSL=1 -DENABLE_PCAP=1 -DCMAKE_BUILD_TYPE=Release .; \
make -j"$(nproc)"; make install; strip /usr/local/bin/sipp || true; \
rm -rf /tmp/sipp; \
fi; \
rm -rf /var/lib/apt/lists/*
# Traffic runner
COPY tools/scripts/traffic_runner.sh /usr/local/bin/traffic_runner
RUN chmod +x /usr/local/bin/traffic_runner
COPY flexric/etc/flexric /usr/local/etc/flexric/
COPY flexric/lib/flexric /usr/local/lib/flexric/
RUN echo "/usr/local/lib/flexric" > /etc/ld.so.conf.d/flexric.conf && ldconfig
ENTRYPOINT ["/bin/bash"]
+111
View File
@@ -0,0 +1,111 @@
#
# Dockerfile to rebuild nakaolab image with O-RAN antenna muting support
#
# Usage:
# cd /home/maki/openairinterface5g
# docker build -f docker/Dockerfile.nakaolab.rebuild -t nakaolab:latest .
#
FROM ubuntu:noble AS builder
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Tokyo
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
ninja-build \
ccache \
git \
libsctp-dev \
libconfig-dev \
libboost-all-dev \
libblas-dev \
liblapack-dev \
liblapacke-dev \
libyaml-cpp-dev \
libusb-1.0-0-dev \
python3 \
python3-pip \
python3-dev \
xxd \
libpcre2-dev \
bison \
flex \
libssl-dev \
libatlas-base-dev \
&& pip3 install pyyaml --break-system-packages \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy source code
WORKDIR /oai-ran
COPY . .
# Build gNB and UE with rfsimulator
RUN cd cmake_targets && \
./build_oai --ninja --gNB --nrUE -w SIMU -c && \
echo "Build complete"
# Build FlexRIC if exists
RUN if [ -d "openair2/E2AP/flexric" ]; then \
cd openair2/E2AP/flexric && \
mkdir -p build && cd build && \
cmake .. && make -j$(nproc) && \
make install; \
fi
#
# Final image
#
FROM ubuntu:noble
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Tokyo
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
libsctp1 \
libconfig9 \
libboost-chrono1.83.0 \
libboost-date-time1.83.0 \
libboost-filesystem1.83.0 \
libboost-regex1.83.0 \
libboost-serialization1.83.0 \
libboost-thread1.83.0 \
libboost-system1.83.0 \
libboost-program-options1.83.0 \
libblas3 \
liblapack3 \
libyaml-cpp0.8 \
libusb-1.0-0 \
net-tools \
iputils-ping \
iproute2 \
iperf \
iperf3 \
netcat-openbsd \
procps \
gdb \
python3 \
python3-six \
python3-requests \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy built binaries and libraries
WORKDIR /oai-ran
COPY --from=builder /oai-ran/cmake_targets/ran_build /oai-ran/cmake_targets/ran_build
COPY --from=builder /oai-ran/targets /oai-ran/targets
COPY --from=builder /oai-ran/ci-scripts/conf_files /oai-ran/ci-scripts/conf_files
# Copy FlexRIC if built
COPY --from=builder /usr/local/lib/flexric /usr/local/lib/flexric
COPY --from=builder /usr/local/etc/flexric /usr/local/etc/flexric
RUN echo "/usr/local/lib/flexric" >> /etc/ld.so.conf.d/flexric.conf && ldconfig || true
# Copy FlexRIC binaries
RUN mkdir -p /oai-ran/openair2/E2AP/flexric/build/examples
COPY --from=builder /oai-ran/openair2/E2AP/flexric/build/examples /oai-ran/openair2/E2AP/flexric/build/examples
ENTRYPOINT ["/bin/bash"]
+4 -4
View File
@@ -49,12 +49,12 @@ RUN set -eux; \
COPY tools/scripts/traffic_runner.sh /usr/local/bin/traffic_runner
RUN chmod +x /usr/local/bin/traffic_runner
# FlexRIC libraries (built by --build-e2)
# FlexRIC libraries (built by --build-e2) - only copy service model libraries (*_sm.so)
RUN mkdir -p /usr/local/etc/flexric /usr/local/lib/flexric && \
cp -r /oai-ran/openair2/E2AP/flexric/build/src/lib/*.so /usr/local/lib/flexric/ 2>/dev/null || true && \
cp -r /oai-ran/openair2/E2AP/flexric/build/src/sm/*.so /usr/local/lib/flexric/ 2>/dev/null || true && \
find /oai-ran/openair2/E2AP/flexric/build -name "*_sm.so" -exec cp {} /usr/local/lib/flexric/ \; && \
cp /oai-ran/openair2/E2AP/flexric/flexric.conf /usr/local/etc/flexric/ 2>/dev/null || true && \
echo "/usr/local/lib/flexric" > /etc/ld.so.conf.d/flexric.conf && ldconfig
echo "/usr/local/lib/flexric" > /etc/ld.so.conf.d/flexric.conf && ldconfig && \
ls -la /usr/local/lib/flexric/
# Install netcat for antenna control testing
RUN apt-get update && apt-get install -y netcat-openbsd && rm -rf /var/lib/apt/lists/*