Compare commits

...

6 Commits

Author SHA1 Message Date
lfarizav
de0aac9182 adding calibrated targets/ARCH/LMSSDR/LimeSDRMini.ini file for limeSDR mini 2020-06-05 10:26:07 -05:00
Javier Morgade
758a69244f CENTOS 7.6.1810 images consolidated for LTE targets
-TOCHECK: Image size are rather high (at lest compared to the ones generated from other develop branch)
	-cmake3, boost 1.58 and uhd v15.0.0 libraries compiled from source (check new scripts folder)
	-container tested from both ubuntu 16.04 and 18.04 (with both RFSIM and USRP setups)
2020-04-02 17:31:50 +02:00
Raphael Defosseux
74e4758772 proper syntax for passing proxy var
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-03-09 11:41:39 +01:00
Raphael Defosseux
6e7db8446b Having a coordinated approach to sudo similar to core network
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
2020-03-05 13:26:01 +01:00
Javier Morgade
b4b2c2e951 README.md file updated with guidelines to launch UE containers 2020-03-05 10:58:49 +01:00
Javier Morgade
169386b78e Base Dockerfiles for eNB and UE
- Ubuntu 16.04
	- Ubuntu 18.04
	- Centos 7.6.1810 (On going)
2020-03-05 10:35:17 +01:00
15 changed files with 2229 additions and 1 deletions

View File

@@ -40,7 +40,14 @@ esac
KERNEL_VERSION=$(uname -r | cut -d '.' -f1)
KERNEL_MAJOR=$(uname -r | cut -d '.' -f2)
SUDO='sudo -E'
IS_CONTAINER=`egrep -c "docker|kubepods" /proc/self/cgroup`
if [ $IS_CONTAINER -eq 0 ]
then
SUDO='sudo -E'
else
SUDO=''
fi
###############################
## echo and family

View File

@@ -0,0 +1,122 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
FROM centos:7.6.1810 AS oai-base
ARG EURECOM_PROXY
RUN yum update -y \
&& yum install centos-release-scl -y \
&& yum-config-manager --enable rhel-server-rhscl-7-rpms -y \
&& yum install -y \
wget \
vim-common \
git \
make \
autoconf \
automake \
bc \
bison \
flex \
libtool \
patch \
#sudo \
openssl \
gcc-c++ \
devtoolset-7 \
atlas-devel \
blas \
blas-devel \
bzip2-devel \
check \
check-devel \
elfutils-libelf-devel \
gflags-devel \
glog-devel \
gmp-devel \
gnutls-devel \
guile-devel \
kernel-devel \
kernel-headers \
lapack \
lapack-devel \
libasan \
libconfig-devel \
libevent-devel \
libffi-devel \
libgcrypt-devel \
libidn-devel \
libidn2-devel \
libtool \
libusb-devel \
libusbx-devel \
libxml2-devel \
libXpm-devel \
libxslt-devel \
libyaml-devel \
lksctp-tools \
lksctp-tools-devel \
lz4-devel \
mariadb-devel \
nettle-devel \
openssh-clients \
openssh-server \
openssl \
openssl-devel \
pkgconfig \
psmisc \
python3-pip.noarch \
python-devel \
python-mako \
unzip \
vim-common \
xforms-devel \
xz-devel \
zlib-devel \
scl-utils \
bzip2 \
#boost-devel \
&& yum clean all -y \
&& rm -rf /var/cache/yum \
&& pip3 install --user mako pexpect \
&& pip3 install six \
&& pip3 install requests
COPY scripts scripts/
RUN scl enable devtoolset-7 scripts/build_missing_packages
RUN rm -rf /tmp/*
# In Eurecom env we need a git proxy
RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop
WORKDIR /openairinterface5g
COPY nasmesh.patch nasmesh.patch
RUN git apply nasmesh.patch
#RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai -I
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=oai-base \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,46 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
FROM ubuntu:16.04 AS oai-base
ARG EURECOM_PROXY
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
vim-common \
git \
&& rm -rf /var/lib/apt/lists/*
# In Eurecom env we need a git proxy
RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop
WORKDIR /openairinterface5g
COPY nasmesh.patch nasmesh.patch
RUN git apply nasmesh.patch
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai -I -w USRP
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=oai-base \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,49 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
FROM ubuntu:18.04 AS oai-base
ARG EURECOM_PROXY
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 install -y \
vim-common \
git \
&& rm -rf /var/lib/apt/lists/*
# In Eurecom env we need a git proxy
RUN /bin/bash -c "if [[ -v EURECOM_PROXY ]]; then git config --global http.proxy http://proxy.eurecom.fr:8080; fi"
RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ /openairinterface5g -b develop
WORKDIR /openairinterface5g
COPY nasmesh.patch nasmesh.patch
RUN git apply nasmesh.patch
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai -I -w USRP
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=oai-base \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,96 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS enb-builder
WORKDIR /openairinterface5g
ENV USER=root
RUN ln -sf /usr/local/bin/cmake /usr/local/bin/cmake3
RUN cd /openairinterface5g/cmake_targets \
&& ln -sf /usr/local/bin/asn1c_oai /usr/local/bin/asn1c \
&& ln -sf /usr/local/share/asn1c_oai /usr/local/share/asn1c \
&& ./build_oai -c --eNB -w USRP --verbose-compile
FROM centos:7.6.1810 AS lte-softmodem
RUN yum update -y && yum install -y nettle.x86_64 \
lksctp-tools.x86_64 \
libyaml.x86_64 \
iperf3.x86_64 \
blas.x86_64 \
atlas.x86_64 \
atlas-devel.x86_64 \
libconfig-devel.x86_64 \
iptables.x86_64 \
lapack-devel.x86_64 \
&& yum clean all -y \
&& rm -rf /var/cache/yum
WORKDIR /openairinterface5g/ci-scripts
COPY --from=enb-builder /openairinterface5g/ci-scripts/ .
WORKDIR /openairinterface5g/cmake_targets
COPY --from=enb-builder /openairinterface5g/cmake_targets/ .
COPY --from=enb-builder /usr/local/bin/uhd_* /usr/local/bin/
COPY --from=enb-builder /usr/local/share/uhd/ /usr/local/share/uhd/
COPY --from=enb-builder /usr/local/lib64/libuhd* /usr/local/lib64/
COPY --from=enb-builder /usr/lib64/libboost_* /usr/lib64/
COPY --from=enb-builder /usr/lib64/libusb* /usr/lib64/
COPY --from=enb-builder /usr/lib/libboost_* /usr/lib/
COPY --from=enb-builder /usr/local/lib/libproto* /usr/local/lib/
RUN find . -name "*.h" -type f -delete
RUN find . -name "*.c" -type f -delete
RUN find / -name "*.a" -type f -delete
RUN find / -name "*.tar.gz" -type f -delete
RUN rm -rf ./ran_build/build/CMakeFiles/
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/:/usr/local/lib:/usr/lib
# S1U, GTP/UDP
EXPOSE 2152/udp
# ?
EXPOSE 22100/tcp
# S1C, SCTP/UDP
EXPOSE 36412/udp
# X2C, SCTP/UDP
EXPOSE 36422/udp
# M2C, SCTP/UDP
EXPOSE 36443/udp
# M3C, SCTP/UDP
EXPOSE 36444/udp
# IF5 / ORI (control)
EXPOSE 50000/udp
# IF5 / ECPRI (data)
EXPOSE 50001/udp
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-softmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,58 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS enb-builder
WORKDIR /openairinterface5g
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai --eNB -w USRP
FROM ubuntu:16.04 AS lte-softmodem
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libssl1.0.0 \
libnettle6 \
libsctp1 \
libforms2 \
libprotobuf-c1 \
libyaml-0-2 \
libconfig9 \
dnsutils \
iproute2 \
iputils-ping \
libblas-dev \
iperf \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g/ci-scripts
COPY --from=enb-builder /openairinterface5g/ci-scripts/ .
WORKDIR /openairinterface5g/cmake_targets
COPY --from=enb-builder /openairinterface5g/cmake_targets/ .
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-softmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,60 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS enb-builder
WORKDIR /openairinterface5g
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai --eNB -w USRP
FROM ubuntu:18.04 AS lte-softmodem
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libssl1.0.0 \
libnettle6 \
libsctp1 \
libforms2 \
libprotobuf-c1 \
libyaml-0-2 \
libconfig9 \
dnsutils \
iproute2 \
iputils-ping \
libblas3 \
libatlas-base-dev \
libblas-dev \
iperf \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g/ci-scripts
COPY --from=enb-builder /openairinterface5g/ci-scripts/ .
WORKDIR /openairinterface5g/cmake_targets
COPY --from=enb-builder /openairinterface5g/cmake_targets/ .
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-softmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,76 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS ue-builder
WORKDIR /openairinterface5g
ENV USER=root
RUN ln -sf /usr/local/bin/cmake /usr/local/bin/cmake3
RUN cd /openairinterface5g/cmake_targets \
&& ln -sf /usr/local/bin/asn1c_oai /usr/local/bin/asn1c \
&& ln -sf /usr/local/share/asn1c_oai /usr/local/share/asn1c \
&& ./build_oai -c --UE -w USRP --verbose-compile
FROM centos:7.6.1810 AS lte-uesoftmodem
RUN yum update -y && yum install -y nettle.x86_64 \
lksctp-tools.x86_64 \
libyaml.x86_64 \
iperf3.x86_64 \
blas.x86_64 \
atlas.x86_64 \
atlas-devel.x86_64 \
libconfig-devel.x86_64 \
iptables.x86_64 \
lapack-devel.x86_64 \
&& yum clean all -y \
&& rm -rf /var/cache/yum
WORKDIR /openairinterface5g/ci-scripts
COPY --from=ue-builder /openairinterface5g/ci-scripts/ .
WORKDIR /openairinterface5g/cmake_targets
COPY --from=ue-builder /openairinterface5g/cmake_targets/ .
COPY --from=ue-builder /usr/local/bin/uhd_* /usr/local/bin/
COPY --from=ue-builder /usr/local/share/uhd/ /usr/local/share/uhd/
COPY --from=ue-builder /usr/local/lib64/libuhd* /usr/local/lib64/
COPY --from=ue-builder /usr/lib64/libboost_* /usr/lib64/
COPY --from=ue-builder /usr/lib64/libusb* /usr/lib64/
COPY --from=ue-builder /usr/lib/libboost_* /usr/lib/
COPY --from=ue-builder /usr/local/lib/libproto* /usr/local/lib/
RUN find . -name "*.h" -type f -delete
RUN find . -name "*.c" -type f -delete
RUN find / -name "*.a" -type f -delete
RUN find / -name "*.tar.gz" -type f -delete
RUN rm -rf ./ran_build/build/CMakeFiles/
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64/:/usr/local/lib:/usr/lib
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-uesoftmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,62 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS ue-builder
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
linux-headers-`uname -r` \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai --UE -w USRP
FROM ubuntu:16.04 AS lte-uesoftmodem
RUN apt-get update && apt-get install -y \
libssl1.0.0 \
libnettle6 \
libsctp1 \
libforms2 \
libconfig9 \
libblas3 \
liblapacke \
sudo \
dnsutils \
iproute2 \
iputils-ping \
net-tools \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g/cmake_targets
COPY --from=ue-builder /openairinterface5g/cmake_targets .
COPY --from=ue-builder /openairinterface5g/targets/bin/nvram .
COPY --from=ue-builder /openairinterface5g/targets/bin/usim .
COPY --from=ue-builder /openairinterface5g/targets ../targets
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-uesoftmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

View File

@@ -0,0 +1,66 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
ARG build_base
FROM $build_base AS ue-builder
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
linux-headers-`uname -r` \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g
ENV USER=root
RUN /bin/bash -c "source oaienv" && cd cmake_targets && ./build_oai --UE -w USRP
FROM ubuntu:18.04 AS lte-uesoftmodem
RUN apt-get update && apt-get install -y \
libssl1.0.0 \
libnettle6 \
libsctp1 \
libforms2 \
libconfig9 \
libblas3 \
liblapacke \
sudo \
dnsutils \
iproute2 \
iputils-ping \
net-tools \
libblas3 \
libatlas-base-dev \
libblas-dev \
iperf \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openairinterface5g/cmake_targets
COPY --from=ue-builder /openairinterface5g/cmake_targets .
COPY --from=ue-builder /openairinterface5g/targets/bin/nvram .
COPY --from=ue-builder /openairinterface5g/targets/bin/usim .
COPY --from=ue-builder /openairinterface5g/targets ../targets
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown
ARG org_label_schema_vcs_ref=unknown
ARG org_label_schema_build_date=unknown
ARG org_opencord_vcs_commit_date=unknown
LABEL org.label-schema.schema-version=1.0 \
org.label-schema.name=lte-uesoftmodem \
org.label-schema.version=$org_label_schema_version \
org.label-schema.vcs-url=$org_label_schema_vcs_url \
org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
org.label-schema.build-date=$org_label_schema_build_date \
org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date

162
docker/Makefile Normal file
View File

@@ -0,0 +1,162 @@
#
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
#
# 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.
#
VERSION ?= $(shell cat ./VERSION)
BASE_NAME ?= oai-base
UE_NAME ?= lte-uesoftmodem
ENB_NAME ?= lte-softmodem
GNB_NAME ?= nr-softmodem
# Tag is fixed to OAI release version, v1.0.0, regardless of VERSION file
DOCKER_TAG ?= 1.0.0
DOCKER_REGISTRY ?=
DOCKER_REPOSITORY ?=
DOCKER_BUILD_ARGS ?=
BASE_IMAGENAME ?= ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${BASE_NAME}:${DOCKER_TAG}
UE_IMAGENAME ?= ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${UE_NAME}:${DOCKER_TAG}
ENB_IMAGENAME ?= ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${ENB_NAME}:${DOCKER_TAG}
GNB_IMAGENAME ?= ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}${GNB_NAME}:${DOCKER_TAG}
## Docker labels. Only set ref and commit date if committed
DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
DOCKER_LABEL_VCS_REF ?= $(shell git diff-index --quiet HEAD -- && git rev-parse HEAD || echo "unknown")
DOCKER_LABEL_COMMIT_DATE ?= $(shell git diff-index --quiet HEAD -- && git show -s --format=%cd --date=iso-strict HEAD || echo "unknown" )
DOCKER_LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
# https://docs.docker.com/engine/reference/commandline/build/#specifying-target-build-stage---target
#
docker-build-centos.7.6.1810:
docker build $(DOCKER_BUILD_ARGS) \
--target ${BASE_NAME} \
--tag ${BASE_IMAGENAME}_centos.7.6.1810 \
--file Dockerfile.base.centos.7.6.1810 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${ENB_NAME} \
--tag ${ENB_IMAGENAME}_centos.7.6.1810 \
--file Dockerfile.enb.centos.7.6.1810 \
--build-arg build_base=${BASE_IMAGENAME}_centos.7.6.1810 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${UE_NAME} \
--tag ${UE_IMAGENAME}_centos.7.6.1810 \
--file Dockerfile.ue.centos.7.6.1810 \
--build-arg build_base=${BASE_IMAGENAME}_centos.7.6.1810 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
# docker build $(DOCKER_BUILD_ARGS) \
# --target ${GNB_NAME} \
# --tag ${GNB_IMAGENAME} \
# --file Dockerfile.gnb \
# --build-arg build_base=${BASE_IMAGENAME} \
# --build-arg org_label_schema_version="${VERSION}" \
# --build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
# --build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
# --build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
# --build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
# .
docker-build-ubuntu-1604:
docker build $(DOCKER_BUILD_ARGS) \
--target ${BASE_NAME} \
--tag ${BASE_IMAGENAME}_ubuntu.16.04 \
--file Dockerfile.base.ubuntu.16.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${ENB_NAME} \
--tag ${ENB_IMAGENAME}_ubuntu.16.04 \
--file Dockerfile.enb.ubuntu.16.04 \
--build-arg build_base=${BASE_IMAGENAME}_ubuntu.16.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${UE_NAME} \
--tag ${UE_IMAGENAME}_ubuntu.16.04 \
--file Dockerfile.ue.ubuntu.16.04 \
--build-arg build_base=${BASE_IMAGENAME}_ubuntu.16.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker-build-ubuntu-1804:
docker build $(DOCKER_BUILD_ARGS) \
--target ${BASE_NAME} \
--tag ${BASE_IMAGENAME}_ubuntu.18.04 \
--file Dockerfile.base.ubuntu.18.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${UE_NAME} \
--tag ${UE_IMAGENAME}_ubuntu.18.04 \
--file Dockerfile.ue.ubuntu.18.04 \
--build-arg build_base=${BASE_IMAGENAME}_ubuntu.18.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker build $(DOCKER_BUILD_ARGS) \
--target ${ENB_NAME} \
--tag ${ENB_IMAGENAME}_ubuntu.18.04 \
--file Dockerfile.enb.ubuntu.18.04 \
--build-arg build_base=${BASE_IMAGENAME}_ubuntu.18.04 \
--build-arg org_label_schema_version="${VERSION}" \
--build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \
--build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \
--build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \
--build-arg org_opencord_vcs_commit_date="${DOCKER_LABEL_COMMIT_DATE}" \
.
docker-push:
docker push ${BASE_IMAGENAME}
docker push ${UE_IMAGENAME}
docker push ${ENB_IMAGENAME}
test: docker-build
.PHONY: docker-build docker-push test

30
docker/README.md Normal file
View File

@@ -0,0 +1,30 @@
## oai-docker
### Docker images build
* At either ubuntu 16.04 or ubuntu 18.04 host, the following builds softmodem images for ubuntu16.04/18.04 targets
(*) centos targets still in progress
sudo make docker-build-ubuntu-1604
sudo make docker-build-ubuntu-1804
### Container generation
* ubuntu 16.04 target
sudo docker run --net=host --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --env RFSIMULATOR=enb -it lte-softmodem:1.0.0_ubuntu.16.04 ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf --rfsim --noS1 --nokrnmod 1
sudo docker run --net=host --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --env RFSIMULATOR=127.0.0.1 -it --privileged lte-uesoftmodem:1.0.0_ubuntu.16.04 ran_build/build/lte-uesoftmodem -r 25 --ue-rxgain 140 --ue-txgain 120 --rfsim --noS1 --nokrnmod 1
* ubuntu 18.04 target
sudo docker run --net=host --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --env RFSIMULATOR=enb -it lte-softmodem:1.0.0_ubuntu.18.04 ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/lte-fdd-mbms-basic-sim.conf --rfsim --noS1 --nokrnmod 1
sudo docker run --net=host --cap-add=NET_ADMIN --device /dev/net/tun:/dev/net/tun --env RFSIMULATOR=127.0.0.1 -it --privileged lte-uesoftmodem:1.0.0_ubuntu.18.04 ran_build/build/lte-uesoftmodem -r 25 --ue-rxgain 140 --ue-txgain 120 --rfsim --noS1 --nokrnmod 1
## Authors
* **Javier Morgade** (javier.morgade@ieee.org) - *Initial work* - [opencord](https://github.com/opencord/openairinterface.git)
## Acknowledgements
* Work based on a set of dockerfiles inherited from [opencord](https://github.com/opencord/openairinterface.git)

37
docker/nasmesh.patch Normal file
View File

@@ -0,0 +1,37 @@
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index ef01e85..aad97fb 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -641,13 +641,13 @@ function main() {
$build_dir coding \
libcoding.so $dbin/libcoding.so
- compilations \
- $build_dir nasmesh \
- CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
+ #compilations \
+ #$build_dir nasmesh \
+ #CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
- compilations \
- $build_dir rb_tool \
- rb_tool $dbin/rb_tool
+ #compilations \
+ #$build_dir rb_tool \
+ #rb_tool $dbin/rb_tool
cp $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 $dbin
fi
@@ -656,9 +656,9 @@ function main() {
if [ "$UE" = 1 ] ; then
echo_info "Compiling UE specific part"
- compilations \
- $build_dir ue_ip \
- CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
+ #compilations \
+ #$build_dir ue_ip \
+ #CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
# mkdir -p $DIR/at_commands/build
# cd $DIR/at_commands/build

View File

@@ -0,0 +1,192 @@
#!/bin/bash
set -x
set -euo pipefail
SCRIPT_DIR=$(dirname $(readlink -f $0))
source /etc/os-release
PLATFORM=${ID#rh*}${VERSION_ID%.*}
function build_install_boost {
rm -rf /tmp/boost
mkdir -p /tmp/boost
cd /tmp/boost
wget http://downloads.sourceforge.net/boost/boost_1_58_0.tar.bz2
bzip2 -d boost_1_58_0.tar.bz2
tar -xvf boost_1_58_0.tar
cd boost_1_58_0
sed -e '1 i#ifndef Q_MOC_RUN' \
-e '$ a#endif' \
-i boost/type_traits/detail/has_binary_operator.hpp &&
./bootstrap.sh --prefix=/usr &&
./b2 stage threading=multi link=shared
./b2 install threading=multi link=shared
}
function build_install_cmake3 {
rm -rf /tmp/cmake3
mkdir -p /tmp/cmake3
cd /tmp/cmake3
wget https://cmake.org/files/v3.13/cmake-3.13.4.tar.gz
tar zxvf cmake-3.13.4.tar.gz
cd cmake-3.13.4
./bootstrap --prefix=/usr/local
make -j$(nproc)
make install
}
function build_install_asn1c_oai {
rm -rf /tmp/asn1c_oai
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c_oai
cd /tmp/asn1c_oai
git checkout 0a7524184f16e7093990a31d8d4db487a16e5782
autoreconf -iv
./configure --program-suffix=_oai
make -j`nproc`
make install
mv /usr/local/share/asn1c /usr/local/share/asn1c_oai
}
function build_install_asn1c_cn {
rm -rf /tmp/asn1c_cn
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c_cn
cd /tmp/asn1c_cn
./configure --program-suffix=_cn
make -j`nproc`
make install
mv /usr/local/share/asn1c /usr/local/share/asn1c_cn
}
function build_install_uhd {
rm -rf /tmp/uhd
git clone https://github.com/EttusResearch/uhd.git /tmp/uhd
cd /tmp/uhd
#git checkout tags/v3.14.1.1
git checkout tags/$1
mkdir -p host/build
cd host/build
cmake ../
make -j`nproc`
make test
make install
ldconfig
}
function build_install_freediameter {
rm -rf /tmp/freediameter
GIT_SSL_NO_VERIFY=true git clone --branch=eurecom-1.2.0 https://gitlab.eurecom.fr/oai/freediameter.git /tmp/freediameter
cd /tmp/freediameter
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter_eurecom-1.2.0_0001-S6a-dictionary-add-CLR-Flags.patch
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter_compatibility-1.2.0_patch_0001-S6a-dictionary-avp493.patch
patch -p1 < ${SCRIPT_DIR}/../patches/freediameter-1.x_api-fix.patch
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../
make -j`nproc`
make install
}
function build_install_liblfds {
rm -rf /tmp/liblfds*
git clone https://github.com/liblfds/liblfds.git /tmp/liblfds
cd /tmp/liblfds/liblfds/liblfds7.1.0/liblfds710/build/gcc_gnumake
make so_dbg
make so_install
}
function build_install_double-conversion {
rm -rf /tmp/double-conversion
git clone --depth=1 --branch=v3.1.5 https://github.com/google/double-conversion.git /tmp/double-conversion
cd /tmp/double-conversion
cmake .
make -j`nproc`
make install
}
function build_install_folly {
rm -rf /tmp/folly
git clone --depth=1 --branch=v2019.06.17.00 https://github.com/facebook/folly.git /tmp/folly
git clone --depth=1 --branch=release-1.8.0 https://github.com/google/googletest.git /tmp/folly/folly/test/gtest
cd /tmp/folly
patch -p1 < ${SCRIPT_DIR}/../patches/folly-gflagslib-fix.patch
mkdir -p _build
cd _build
cmake ..
make -j`nproc`
make install
}
function build_install_libuv {
rm -rf /tmp/libuv
git clone --depth=1 --branch=v1.23.1 https://github.com/libuv/libuv.git /tmp/libuv
cd /tmp/libuv
mkdir -p build
cd build
cmake ..
make -j`nproc`
make install
}
function build_install_protobuf {
rm -rf /tmp/protobuf
git clone --depth=1 --branch=v3.3.0 https://github.com/protocolbuffers/protobuf.git /tmp/protobuf
cd /tmp/protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make -j`nproc`
make install
}
function build_install_protobuf_c {
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
rm -rf /tmp/protobuf-c
git clone --depth=1 --branch=v1.3.0 https://github.com/protobuf-c/protobuf-c.git /tmp/protobuf-c
cd /tmp/protobuf-c
./autogen.sh
./configure
make -j`nproc`
make install
}
build_install_cmake3
case "${PLATFORM}" in
el8)
(cd /usr/bin && ln -sf python2 python)
;;
el7)
(cd /usr/bin && ln -sf cmake3 cmake)
build_install_protobuf
build_install_protobuf_c
;;
centos7)
(cd /usr/bin && ln -sf cmake3 cmake)
build_install_boost
build_install_protobuf
build_install_protobuf_c
build_install_uhd v3.15.0.0
sed -i 's/python2/python3/g' /usr/local/bin/uhd_images_downloader
uhd_images_downloader
;;
centos8)
(cd /usr/bin && ln -sf cmake3 cmake)
build_install_uhd v3.15.0.0
sed -i 's/python2/python3/g' /usr/local/bin/uhd_images_downloader
uhd_images_downloader
build_install_protobuf
build_install_protobuf_c
;;
fedora31)
(cd /usr/bin && ln -sf cmake3 cmake)
build_install_uhd v3.15.0.0
sed -i 's/python2/python3/g' /usr/local/bin/uhd_images_downloader
uhd_images_downloader
build_install_protobuf
build_install_protobuf_c
;;
esac
build_install_asn1c_oai
build_install_asn1c_cn

File diff suppressed because it is too large Load Diff