Commit b75d9562 authored by Raphael Defosseux's avatar Raphael Defosseux

chore(build): adding docker support for rocky-linux

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6cc01f7c
......@@ -33,6 +33,7 @@ OS_RELEASE=$(grep "^VERSION_ID=" /etc/os-release | sed "s/VERSION_ID=//" | sed "
case "$OS_DISTRO" in
fedora) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
rhel) OS_BASEDISTRO="fedora"; INSTALLER="yum"; CMAKE="cmake3" ;;
rocky) OS_BASEDISTRO="fedora"; INSTALLER="dnf"; CMAKE="cmake" ;;
centos) OS_BASEDISTRO="centos"; INSTALLER="yum"; CMAKE="cmake3" ;;
debian) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
ubuntu) OS_BASEDISTRO="debian"; INSTALLER="apt-get"; CMAKE="cmake" ;;
......@@ -126,6 +127,12 @@ check_supported_distribution() {
"rhel9.3") return 0 ;;
"centos7") return 0 ;;
"centos8") return 0 ;;
"rocky8.7") return 0 ;;
"rocky8.8") return 0 ;;
"rocky8.9") return 0 ;;
"rocky9.1") return 0 ;;
"rocky9.2") return 0 ;;
"rocky9.3") return 0 ;;
esac
return 1
}
......@@ -300,7 +307,7 @@ install_usrp_uhd_driver_from_source(){
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
$SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py
fi
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py
fi
fi
......@@ -367,7 +374,7 @@ check_install_usrp_uhd_driver(){
$SUDO $INSTALLER -y install $boost_libs_fedora $CMAKE
$SUDO pip3 install mako requests
fi
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if [ $IS_CONTAINER -eq 0 ]
then
# until EPEL repo hasn't bumped UHD driver to >=3.10 in EPEL, build driver from source
......@@ -389,13 +396,13 @@ install_usrp_uhd_driver() {
# quick workaround for RHE7.6
local distribution=$(get_distribution_release)
if [ -z $1 ]; then
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader
else
$SUDO uhd_images_downloader
fi
else
if [[ "$OS_DISTRO" == "rhel" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
$SUDO /usr/local/bin/uhd_images_downloader -i $1
else
$SUDO uhd_images_downloader -i $1
......@@ -562,7 +569,7 @@ check_install_additional_tools (){
libforms-bin \
libforms-dev \
xmlstarlet"
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
elif [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
PACKAGE_LIST="\
doxygen \
ctags \
......@@ -623,7 +630,7 @@ check_install_oai_software() {
xxd
elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]]; then
if [[ "$OS_DISTRO" == "rhel" ]] || [[ "$OS_DISTRO" == "centos" ]] || [[ "$OS_DISTRO" == "rocky" ]]; then
if rpm -q epel-release > /dev/null; then
echo "EPEL repos already present. Good."
else
......
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM $BASE_IMAGE AS ran-base
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.4.0.0
RUN dnf install 'dnf-command(config-manager)' -y && \
dnf config-manager --set-enabled powertools && \
dnf install epel-release -y && crb enable && \
dnf update -y && \
dnf install -y \
#gcc needed for build_oai
gcc gcc-c++ \
diffutils \
file \
psmisc \
git \
# python3-pip and pyyaml are used for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
#create the WORKDIR
WORKDIR /oai-ran
COPY . .
#run build_oai -I to get the builder image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I --install-optional-packages -w USRP
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
FROM ran-base:latest as ran-build
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope" -w USRP --verbose-ci --noavx512 -c
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS enb-base
FROM ran-build:latest AS enb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters.yaml && \
cp /oai-ran/docker/scripts/enb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-enb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
tzdata \
procps-ng \
atlas \
gdb \
python3 \
python3-pip \
net-tools \
iputils \
iproute && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-enb/bin
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/lte-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_enb.so \
/usr/local/lib/
COPY --from=enb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=enb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=enb-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=enb-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=enb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-softmodem" && ldd /opt/oai-enb/bin/lte-softmodem && \
echo "ldd on liboai_eth_transpro.so" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator.so" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif.so" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding.so" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig.so" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts.so" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on liboai_iqplayer.so" && ldd /usr/local/lib/liboai_iqplayer.so && \
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_enb.so" && ldd /usr/local/lib/libtelnetsrv_enb.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-enb/etc
COPY --from=enb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-enb
# 2152 --> S1U, GTP/UDP
# 36412 --> S1C, SCTP/UDP
# 36422 --> X2C, SCTP/UDP
EXPOSE 2152/udp 36412/udp 36422/udp
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
COPY ./libori.so /usr/local/lib
# build AW2S fronthaul lib
WORKDIR /oai-ran
RUN /bin/sh oaienv && \
cd cmake_targets/ran_build/build && \
ninja aw2sori_transpro
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb-aw2s
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
net-tools \
iputils && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb-aw2s/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
./
COPY ./docker/scripts/gnb-aw2s_entrypoint.sh ./entrypoint.sh
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libaw2sori_transpro.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/libori.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
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 && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb-aw2s/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on libaw2sori_transpro" && ldd /usr/local/lib/libaw2sori_transpro.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-gnb
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
libXpm \
libX11 \
atlas \
lksctp-tools \
tzdata \
gdb \
python3 \
python3-pip \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libforms.so.2 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
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
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=gnb-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-softmodem" && ldd /opt/oai-gnb/bin/nr-softmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_ci" && ldd /usr/local/lib/libtelnetsrv_ci.so
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/docker/etc .
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS lte-ue-base
FROM ran-build:latest AS lte-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_parameters.yaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_sim_parameters.yaml && \
cp /oai-ran/docker/scripts/lte_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-lte-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
atlas \
gdb \
python3 \
python3-pip \
iproute \
net-tools \
iputils && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-lte-ue/bin
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
/oai-ran/cmake_targets/nas_sim_tools/build/conf2uedata \
/oai-ran/cmake_targets/nas_sim_tools/build/nvram \
/oai-ran/cmake_targets/nas_sim_tools/build/usim \
./
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=lte-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=lte-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=lte-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=lte-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=lte-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on lte-uesoftmodem" && ldd /opt/oai-lte-ue/bin/lte-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
# Copy the relevant configuration files for UE
WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/docker/etc .
WORKDIR /opt/oai-lte-ue
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS gnb-base
FROM ran-build:latest AS gnb-build
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-cuup
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
procps-ng \
lksctp-tools \
tzdata \
atlas \
net-tools \
iputils && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
COPY --from=gnb-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/
RUN ldconfig && \
echo "ldd on nr-cuup" && ldd /opt/oai-gnb/bin/nr-cuup && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Rocky 8.7
#
#---------------------------------------------------------------------
ARG BASE_IMAGE=docker.io/rockylinux:8.7
FROM ran-base:latest AS nr-ue-base
FROM ran-build:latest AS nr-ue-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/nr_ue_parameters.yaml && \
cp /oai-ran/docker/scripts/nr_ue_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM $BASE_IMAGE as oai-nr-ue
ENV TZ=Europe/Paris
RUN dnf update -y && \
dnf install -y \
lksctp-tools \
procps-ng \
tzdata \
net-tools \
iputils \
iproute \
atlas \
gdb \
python3 \
python3-pip \
libXpm \
libX11 && \
pip3 install six && \
pip3 install requests && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build \
/oai-ran/ci-scripts/conf_files/nr-ue-sim.conf \
/oai-ran/docker/etc/nr-ue.nfapi.conf \
./
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_5Gue.so \
/usr/local/lib/
COPY --from=nr-ue-base \
/lib64/libconfig.so.9 \
/lib64/libblas.so.3 \
/lib64/liblapack.so.3 \
/lib64/liblapacke.so.3 \
/lib64/libforms.so.2 \
/lib64/libboost_chrono.so.1.66.0 \
/lib64/libboost_date_time.so.1.66.0 \
/lib64/libboost_filesystem.so.1.66.0 \
/lib64/libboost_program_options.so.1.66.0 \
/lib64/libboost_serialization.so.1.66.0 \
/lib64/libboost_thread.so.1.66.0 \
/lib64/libboost_system.so.1.66.0 \
/lib64/libboost_unit_test_framework.so.1.66.0 \
/lib64/libboost_atomic.so.1.66.0 \
/lib64/libboost_timer.so.1.66.0 \
/lib64/libboost_regex.so.1.66.0 \
/lib64/libicudata.so.60 \
/lib64/libicui18n.so.60 \
/lib64/libicuuc.so.60 \
/lib64/
# Now we are copying from builder-image the UHD files.
COPY --from=nr-ue-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=nr-ue-base /usr/local/lib64/libuhd.so.4.4.0 /usr/local/lib64
COPY --from=nr-ue-base /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin
WORKDIR /usr/local/share/uhd/rfnoc
COPY --from=nr-ue-base /usr/local/share/uhd/rfnoc/ .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig && \
echo "ldd on nr-uesoftmodem" && ldd /opt/oai-nr-ue/bin/nr-uesoftmodem && \
echo "ldd on liboai_eth_transpro" && ldd /usr/local/lib/liboai_eth_transpro.so && \
echo "ldd on librfsimulator" && ldd /usr/local/lib/librfsimulator.so && \
echo "ldd on liboai_usrpdevif" && ldd /usr/local/lib/liboai_usrpdevif.so && \
echo "ldd on libcoding" && ldd /usr/local/lib/libcoding.so && \
echo "ldd on libparams_libconfig" && ldd /usr/local/lib/libparams_libconfig.so && \
echo "ldd on libdfts" && ldd /usr/local/lib/libdfts.so && \
echo "ldd on libldpc" && ldd /usr/local/lib/libldpc.so && \
echo "ldd on libldpc_optim" && ldd /usr/local/lib/libldpc_optim.so && \
echo "ldd on libldpc_optim8seg" && ldd /usr/local/lib/libldpc_optim8seg.so && \
echo "ldd on libldpc_orig" && ldd /usr/local/lib/libldpc_orig.so && \
echo "ldd on libtelnetsrv" && ldd /usr/local/lib/libtelnetsrv.so && \
echo "ldd on libtelnetsrv_5Gue" && ldd /usr/local/lib/libtelnetsrv_5Gue.so
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-nr-ue/etc
COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -77,6 +77,7 @@ The currently-supported OS are:
- `rhel8.2` for Red Hat Entreprise Linux (including images for an OpenShift cluster)
- `ubuntu20` for Ubuntu 20.04 LTS
- `rocky` for Rocky-Linux 8.7
For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md).
......@@ -111,6 +112,8 @@ ran-base latest 5c9c02a5b4a8 1 minute ago
...
```
**Note that the steps are identical for `rocky-linux`.**
## 3.3. Building any target image ##
For example, the eNB:
......@@ -136,6 +139,8 @@ Do not forget to remove the temporary image:
docker image prune --force
```
**Note that the steps are identical for `rocky-linux`.**
# 4. Building using `podman` under Red Hat Entreprise Linux 8.2 #
Analogous to the above steps:
......
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