Commit d2347a7c authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/add_e2_sm_in_dockerfiles' into integration_2024_w39

parents 6b9ddbab 8f532752
......@@ -286,7 +286,7 @@ install_usrp_uhd_driver_from_source(){
git diff
mkdir -p host/build
cd host/build || true
$CMAKE ../ -GNinja
$CMAKE ../ -GNinja -DENABLE_TESTS=OFF -DENABLE_EXAMPLES=OFF
echo "Compiling UHD"
ninja
$SUDO ninja install
......
......@@ -58,8 +58,9 @@ RUN rm -f /etc/rhsm-host && \
python3-devel \
numactl-libs \
numactl-devel \
gcc-toolset-12-gcc \
gcc-toolset-12-gcc-c++ \
#use gcc-13 to avoid problems of default gcc-11 in FlexRIC
gcc-toolset-13-gcc \
gcc-toolset-13-gcc-c++ \
# python3-pip and pyyaml are used for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml && \
......@@ -91,6 +92,6 @@ COPY oaienv .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
scl enable gcc-toolset-12 "\
scl enable gcc-toolset-13 "\
./build_oai -I --install-optional-packages -w USRP" && \
rm /etc/pki/entitlement/*pem
......@@ -35,7 +35,6 @@ ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.4.0.0
#install developers pkg/repo
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
......@@ -43,6 +42,7 @@ RUN apt-get update && \
build-essential \
psmisc \
git \
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
gcc-12 \
g++-12 \
xxd \
......
......@@ -56,7 +56,7 @@ ARG KPM_VERSION=KPM_V3_00
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
scl enable gcc-toolset-12 "\
scl enable gcc-toolset-13 "\
./build_oai \
--gNB \
--build-lib 'telnetsrv enbscope uescope nrscope' \
......@@ -70,7 +70,7 @@ RUN /bin/sh oaienv && \
## Build FlexRIC for SM Models
RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
scl enable gcc-toolset-12 "\
scl enable gcc-toolset-13 "\
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
......
......@@ -27,6 +27,9 @@
FROM ran-base:latest AS ran-build
ARG E2AP_VERSION=E2AP_V3
ARG KPM_VERSION=KPM_V3_00
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
......@@ -35,12 +38,26 @@ COPY . .
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
CXXFLAGS="-Werror -fstack-protector-strong" CFLAGS="-Werror -fstack-protector-strong" ./build_oai -c --ninja \
scl enable gcc-toolset-13 "\
CXXFLAGS='-Werror -fstack-protector-strong' CFLAGS='-Werror -fstack-protector-strong' ./build_oai -c --ninja \
--eNB --gNB --RU --UE --nrUE \
--build-lib "telnetsrv enbscope uescope nrscope" \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt \
-DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--build-lib 'telnetsrv enbscope uescope nrscope' \
-w USRP -t Ethernet \
--noavx512 && \
--noavx512" && \
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
## Build FlexRIC for SM Models
RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
scl enable gcc-toolset-13 "\
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION .. &&\
ninja && \
ninja install"
......@@ -28,6 +28,9 @@
FROM ran-base:latest AS ran-build
ARG BUILD_OPTION
ARG E2AP_VERSION=E2AP_V3
ARG KPM_VERSION=KPM_V3_00
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
......@@ -40,7 +43,7 @@ RUN /bin/sh oaienv && \
--eNB --gNB --RU --UE --nrUE \
--build-lib "telnetsrv enbscope uescope nrscope" \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
--noavx512 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
# Mainly to see if the sanitize option was perfectly executed
......@@ -48,3 +51,15 @@ RUN /bin/sh oaienv && \
ldd ran_build/build/*softmodem* ran_build/build/nr-cuup ran_build/build/oairu && \
echo "---- ldd on shared libraries ----" && \
ldd ran_build/build/*.so
## Build FlexRIC for SM Models
RUN mkdir -p openair2/E2AP/flexric/build && \
cd openair2/E2AP/flexric/build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release \
-DXAPP_MULTILANGUAGE=OFF \
-DKPM_VERSION=$KPM_VERSION \
-DE2AP_VERSION=$E2AP_VERSION \
-DCMAKE_C_COMPILER=gcc-12 \
-DCMAKE_CXX_COMPILER=g++-12 .. && \
ninja && \
ninja install
......@@ -76,6 +76,9 @@ COPY --from=gnb-base \
/lib64/libforms.so.2 \
/lib64/
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_transpro.so && \
ln -s /usr/local/lib/liboai_eth_transpro.so /usr/local/lib/liboai_transpro.so && \
ldconfig && \
......
......@@ -93,6 +93,9 @@ COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=gnb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
......
......@@ -99,6 +99,8 @@ COPY --from=gnb-build \
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
......
......@@ -61,6 +61,9 @@ COPY --from=gnb-base \
/lib64/libconfig.so.11 \
/lib64/
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
RUN ldconfig && \
echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
......
......@@ -55,6 +55,8 @@ RUN apt-get update && \
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
## Copy E2 SM models
COPY --from=gnb-build /usr/local/lib/flexric /usr/local/lib/flexric
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment