Commit 6c3dccfb authored by Mohammed Ismail's avatar Mohammed Ismail

Added the dockerfiles for u18 and rhel8

Signed-off-by: default avatarMohammed Ismail <mohammed.ismail@openairinterface.org>
parent 4a4636d2
#/*
# * 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 RHEL8
#
#---------------------------------------------------------------------
FROM localhost/ran-build:latest AS lte-ru-build
WORKDIR /oai-ran
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
rm -Rf log && \
mkdir -p log && \
./build_oai -w USRP --RU --ninja
# debug
RUN ldconfig -v && ldd /oai-ran/targets/bin/oairu.Rel15
RUN ls -ls /oai-ran/targets/bin
RUN ls -ls /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable
FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ru
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \
nettle \
atlas \
net-tools \
iputils \
iproute \
libyaml && \
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-ru/bin
COPY --from=lte-ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=lte-ru-build /oai-ran/docker/scripts/lteru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=lte-ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
#COPY --from=lte-ru-build /oai-ran/targets/bin/libcoding.so .
COPY --from=lte-ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=lte-ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
#COPY --from=lte-ru-build /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
COPY --from=lte-ru-build /usr/local/lib/libprotobuf-c.so.1 .
COPY --from=lte-ru-build /lib64/libconfig.so.9 /lib64
COPY --from=lte-ru-build /lib64/libblas.so.3 /lib64
COPY --from=lte-ru-build /lib64/liblapack.so.3 /lib64
COPY --from=lte-ru-build /lib64/liblapacke.so.3 /lib64
COPY --from=lte-ru-build /lib64/libboost_chrono.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_date_time.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_program_options.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_serialization.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_thread.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_system.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_atomic.so.1.66.0 /lib64
COPY --from=lte-ru-build /lib64/libboost_timer.so.1.66.0 /lib64
COPY --from=lte-ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64
RUN ldconfig
#debug
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/liboai_iqplayer.so
#RUN ldd /opt/oai-enb/bin/oairu.Rel15
# Copy the relevant configuration files for eNB
WORKDIR /opt/oai-lte-ru/etc
#COPY --from=enb-build /oai-ran/ci-scripts/conf_files/enb.* .
#COPY --from=enb-build /oai-ran/ci-scripts/conf_files/rcc.* .
#COPY --from=enb-build /oai-ran/ci-scripts/conf_files/cu.* .
#COPY --from=enb-build /oai-ran/ci-scripts/conf_files/du.* .
COPY --from=lte-ru-build /oai-ran/ci-scripts/conf_files/rru.* .
WORKDIR /opt/oai-lte-ru
#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-lte-ru/bin/entrypoint.sh"]
#CMD ["/opt/oai-lte-ru/bin/oairu", "-O", "/opt/oai-lte-ru/etc/lteru.conf"]
CMD ["sleep", "infinity"]
#/*
# * 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 Ubuntu 18.04
#
#---------------------------------------------------------------------
FROM ran-build:latest AS lte-ru-build
WORKDIR /oai-ran
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
rm -Rf log && \
mkdir -p log && \
./build_oai -w USRP --RU --ninja
RUN apt-get install -y python3-pip && \
pip3 install --ignore-installed pyyaml && \
python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lteru_parameters.yaml
# debug
#RUN ldconfig -v && ldd /oai-ran/targets/bin/oairu.Rel15
#RUN ls -ls /oai-ran/targets/bin
#RUN ls -ls /oai-ran/cmake_targets/ran_build/build/*.so
#start from scratch for target executable
FROM ubuntu:bionic as oai-lte-ru
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
libsctp1 \
libnettle6 \
libblas3 \
libatlas3-base \
libconfig9 \
openssl \
net-tools \
iputils-ping \
iproute2 \
libyaml-0-2 && \
# Install UHD driver from ettus ppa
# At time of writing, it is 3.14
add-apt-repository ppa:ettusresearch/uhd --yes && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
python \
libusb-1.0-0 \
libuhd003 \
uhd-host && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-lte-ru/bin
COPY --from=lte-ru-build /oai-ran/targets/bin/oairu.Rel15 .
COPY --from=lte-ru-build /oai-ran/docker/scripts/lteru_entrypoint.sh entrypoint.sh
WORKDIR /usr/local/lib/
COPY --from=lte-ru-build /oai-ran/targets/bin/liboai_eth_transpro.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/libtcp_bridge_oai.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 .
COPY --from=lte-ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 .
#COPY --from=lte-ru-build /oai-ran/targets/bin/libcoding.so .
COPY --from=lte-ru-build /oai-ran/targets/bin/libparams_libconfig.so .
COPY --from=lte-ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so .
#COPY --from=enb-build /oai-ran/cmake_targets/ran_build/build/liboai_iqplayer.so .
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so"
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so"
RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so"
COPY --from=lte-ru-build /usr/local/lib/libprotobuf-c.so.1 .
RUN ldconfig
#debug
#RUN ldd /usr/local/lib/liboai_eth_transpro.so.Rel15
#RUN ldd /usr/local/lib/libtcp_bridge_oai.so.Rel15
#RUN ldd /usr/local/lib/librfsimulator.so.Rel15
#RUN ldd /usr/local/lib/liboai_usrpdevif.so.Rel15
#RUN ldd /usr/local/lib/libcoding.so
#RUN ldd /usr/local/lib/libparams_libconfig.so
#RUN ldd /usr/local/lib/libdfts.so
#RUN ldd /usr/local/lib/liboai_iqplayer.so
#RUN ldd /opt/oai-lte-ru/bin/oairu.Rel15
# Copy the relevant configuration files for lte-ru
WORKDIR /opt/oai-lte-ru/etc
COPY --from=lte-ru-build /oai-ran/docker/etc .
WORKDIR /opt/oai-lte-ru
# 2152 --> S1U, GTP/UDP
# 36412 --> S1C, SCTP/UDP
# 36422 --> X2C, SCTP/UDP
#EXPOSE 2152/udp 36412/udp 36422/udp
#EXPOSE 22100/tcp # ?
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
#CMD ["/opt/oai-lte-ru/bin/oairu.Rel15", "-O", "/opt/oai-lte-ru/etc/lteru.conf"]
#!/bin/bash
set -euo pipefail
# Based another env var, pick one template to use
if [[ -v USE_FDD_RRU ]]; then ln -s /opt/oai-lte-ru/etc/rru.fdd.conf /opt/oai-lte-ru/etc/lteru.conf; fi
if [[ -v USE_TDD_RRU ]]; then ln -s /opt/oai-lte-ru/etc/rru.tdd.conf /opt/oai-lte-ru/etc/lteru.conf; fi
# Only this template will be manipulated
CONFIG_FILES=`ls /opt/oai-lte-ru/etc/lteru.conf`
for c in ${CONFIG_FILES}; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
fi
EXPRESSIONS="${EXPRESSIONS};s|${v}|${!NEW_VAR}|g"
done
EXPRESSIONS="${EXPRESSIONS#';'}"
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
# Load the USRP binaries
if [[ -v USE_B2XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx
elif [[ -v USE_X3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx
elif [[ -v USE_N3XX ]]; then
/usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx
fi
echo "=================================="
echo "== Starting eNB 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
done
for word in ${USE_ADDITIONAL_OPTIONS}; do
new_args+=("$word")
done
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
fi
#/*
# * 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
# */
---
- paths:
source_dir: "ci-scripts/conf_files/"
dest_dir: docker/etc
- configurations:
- filePrefix: rru.fdd
outputfilename: "rru.fdd.conf"
config:
- key: local_if_name
env: "@RRU_IF4P5_IF_NAME@"
- key: remote_address
env: "@RCC_REMOTE_IP_ADDRESS@"
- key: local_address
env: "@RRU_LOCAL_IP_ADDRESS@"
- key: bands
env: "@UTRA_BAND_ID@"
- filePrefix: rru.tdd
outputfilename: "rru.tdd.conf"
config:
- key: local_if_name
env: "@RRU_IF4P5_IF_NAME@"
- key: remote_address
env: "@RCC_REMOTE_IP_ADDRESS@"
- key: local_address
env: "@RRU_LOCAL_IP_ADDRESS@"
- key: bands
env: "@UTRA_BAND_ID@"
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