Enable gNB configuration through YAML file
This commit is contained in:
@@ -78,7 +78,8 @@ RUN apt-get update && \
|
||||
iputils-ping \
|
||||
gdb \
|
||||
moreutils \
|
||||
libusb-1.0-0 && \
|
||||
libusb-1.0-0 \
|
||||
libyaml-cpp-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
@@ -86,7 +87,10 @@ COPY --from=ran-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
|
||||
COPY ./docker/scripts/gnb_entrypoint.sh ./entrypoint.sh
|
||||
|
||||
COPY --from=ran-build /oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so /usr/local/lib/
|
||||
COPY --from=ran-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
#copy files from nvIPC
|
||||
COPY --from=ran-build \
|
||||
@@ -107,4 +111,4 @@ RUN ldconfig && \
|
||||
WORKDIR /opt/oai-gnb
|
||||
COPY --from=ran-build /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -78,7 +78,8 @@ RUN apt-get update && \
|
||||
iputils-ping \
|
||||
gdb \
|
||||
moreutils \
|
||||
libusb-1.0-0 && \
|
||||
libusb-1.0-0 \
|
||||
libyaml-cpp-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
@@ -92,6 +93,7 @@ COPY --from=ran-build \
|
||||
/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/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
#copy files from nvIPC
|
||||
@@ -113,4 +115,4 @@ RUN ldconfig && \
|
||||
WORKDIR /opt/oai-gnb
|
||||
COPY --from=ran-build /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -41,6 +41,9 @@ RUN /bin/sh oaienv && \
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-aw2s
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install -y \
|
||||
procps-ng \
|
||||
@@ -50,7 +53,8 @@ RUN dnf update -y && \
|
||||
lksctp-tools \
|
||||
tzdata \
|
||||
net-tools \
|
||||
iputils && \
|
||||
iputils \
|
||||
yaml-cpp-devel && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
|
||||
|
||||
@@ -69,6 +73,7 @@ COPY --from=gnb-build \
|
||||
/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/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
@@ -98,4 +103,4 @@ WORKDIR /opt/oai-gnb-aw2s
|
||||
|
||||
COPY --from=gnb-base /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
|
||||
|
||||
@@ -70,6 +70,7 @@ COPY --from=gnb-build \
|
||||
/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/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
@@ -96,4 +97,4 @@ WORKDIR /opt/oai-gnb-aw2s
|
||||
|
||||
COPY --from=gnb-base /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
|
||||
|
||||
@@ -55,7 +55,8 @@ RUN apt-get update && \
|
||||
openssl \
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iputils-ping && \
|
||||
iputils-ping \
|
||||
libyaml-cpp-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY ./libori.so /usr/local/lib/
|
||||
@@ -73,6 +74,7 @@ COPY --from=gnb-build \
|
||||
/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/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
|
||||
@@ -95,4 +97,4 @@ WORKDIR /opt/oai-gnb-aw2s
|
||||
|
||||
COPY --from=gnb-base /tini /tini
|
||||
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem"]
|
||||
|
||||
@@ -33,6 +33,9 @@ FROM ran-build-fhi72:latest AS gnb-build
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-fhi72
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
|
||||
# Copy the entitlements
|
||||
COPY ./etc-pki-entitlement /etc/pki/entitlement
|
||||
|
||||
@@ -55,7 +58,8 @@ RUN rm -f /etc/rhsm-host && \
|
||||
python3 \
|
||||
python3-pip \
|
||||
net-tools \
|
||||
iputils && \
|
||||
iputils \
|
||||
yaml-cpp-devel && \
|
||||
pip3 install six && \
|
||||
pip3 install requests && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
@@ -78,6 +82,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
## Libxran library
|
||||
@@ -122,4 +127,4 @@ RUN ldconfig && \
|
||||
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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -70,6 +70,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
## Libxran library
|
||||
@@ -114,4 +115,4 @@ RUN ldconfig && \
|
||||
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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -58,7 +58,8 @@ RUN apt-get update && \
|
||||
libnuma-dev \
|
||||
python3 \
|
||||
python3-six \
|
||||
python3-requests &&\
|
||||
python3-requests \
|
||||
libyaml-cpp-dev && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan5 \
|
||||
@@ -80,6 +81,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
## Libxran library
|
||||
@@ -110,4 +112,4 @@ RUN ldconfig && \
|
||||
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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -34,6 +34,9 @@ FROM ran-build:latest AS gnb-build
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install -y \
|
||||
procps-ng \
|
||||
@@ -46,7 +49,8 @@ RUN dnf update -y && \
|
||||
python3 \
|
||||
python3-pip \
|
||||
net-tools \
|
||||
iputils && \
|
||||
iputils \
|
||||
yaml-cpp-devel && \
|
||||
pip3 install six && \
|
||||
pip3 install requests && \
|
||||
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
|
||||
@@ -67,6 +71,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
@@ -125,4 +130,4 @@ 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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -68,6 +68,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
COPY --from=gnb-base \
|
||||
@@ -123,4 +124,4 @@ 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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -63,7 +63,8 @@ RUN apt-get update && \
|
||||
python3 \
|
||||
python3-six \
|
||||
python3-requests \
|
||||
libusb-1.0-0 && \
|
||||
libusb-1.0-0 \
|
||||
libyaml-cpp-dev && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
#libasan5 \ # see below
|
||||
@@ -93,6 +94,7 @@ COPY --from=gnb-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libldpc*.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \
|
||||
/oai-ran/cmake_targets/ran_build/build/libparams_yaml.so \
|
||||
/usr/local/lib/
|
||||
|
||||
# Now we are copying from builder-image the UHD files.
|
||||
@@ -128,4 +130,4 @@ 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", "-O", "/opt/oai-gnb/etc/gnb.conf"]
|
||||
CMD ["/opt/oai-gnb/bin/nr-softmodem"]
|
||||
|
||||
@@ -9,14 +9,29 @@ echo "=================================="
|
||||
echo "/proc/sys/kernel/core_pattern=$(cat /proc/sys/kernel/core_pattern)"
|
||||
|
||||
if [ ! -f $CONFIGFILE ]; then
|
||||
echo "No configuration file found: please mount at $CONFIGFILE"
|
||||
exit 255
|
||||
echo "No configuration file $CONFIGFILE found: attempting to find YAML config"
|
||||
YAML_CONFIGFILE=$PREFIX/etc/gnb.yaml
|
||||
if [ ! -f $YAML_CONFIGFILE ]; then
|
||||
echo "No configuration file $YAML_CONFIGFILE found. Please mount either at $CONFIGFILE or $YAML_CONFIGFILE"
|
||||
exit 255
|
||||
fi
|
||||
CONFIGFILE=$YAML_CONFIGFILE
|
||||
fi
|
||||
|
||||
echo "=================================="
|
||||
echo "== Configuration file:"
|
||||
cat $CONFIGFILE
|
||||
|
||||
new_args=()
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
new_args+=("$1")
|
||||
shift
|
||||
done
|
||||
|
||||
new_args+=("-O")
|
||||
new_args+=("$CONFIGFILE")
|
||||
|
||||
# Load the USRP binaries
|
||||
echo "=================================="
|
||||
echo "== Load USRP binaries"
|
||||
@@ -35,7 +50,6 @@ echo "=================================="
|
||||
echo "== Starting gNB soft modem"
|
||||
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
|
||||
new_args=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
new_args+=("$1")
|
||||
shift
|
||||
@@ -46,6 +60,6 @@ if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
|
||||
echo "${new_args[@]}"
|
||||
exec "${new_args[@]}"
|
||||
else
|
||||
echo "$@"
|
||||
exec "$@"
|
||||
echo "${new_args[@]}"
|
||||
exec "${new_args[@]}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user