diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index c9390d67ce5202478b4951746a58505aef22c5c8..c68ca8a553f2ad94987c28f969159dd639f44eae 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -551,7 +551,7 @@ function main() { if [ "$HW" == "OAI_USRP" ] ; then echo_info "installing packages for USRP support" check_install_usrp_uhd_driver - if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then + if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then install_usrp_uhd_driver $UHD_IMAGES_DIR fi fi diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index d3fcf615e220140d9c21e7b266a2248651a95e5b..4916c21d34d03a37b5c40ddb2ce0ae7b78abc142 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -317,19 +317,30 @@ install_usrp_uhd_driver_from_source(){ echo_info "\nInstalling UHD driver from sources. The log file for UHD driver installation is here: $uhd_install_log " ( pushd /tmp - echo "Downloading UHD driver" + echo "Cloning UHD driver repository" rm -rf /tmp/uhd git clone https://github.com/EttusResearch/uhd.git cd uhd - git checkout tags/v4.0.0.0 + if [[ -v UHD_VERSION ]]; then + git checkout tags/v${UHD_VERSION} + else + git checkout tags/v4.0.0.0 + fi mkdir -p host/build - cd host/build - $CMAKE ../ + cd host/build || true + $CMAKE ../ -GNinja echo "Compiling UHD" - make -j`nproc` - make test - $SUDO make install + ninja + $SUDO ninja install $SUDO ldconfig -v + if [ $IS_CONTAINER -eq 0 ]; then + if [[ "$OS_DISTRO" == "ubuntu" ]]; then + $SUDO /usr/local/lib/uhd/utils/uhd_images_downloader.py + fi + if [[ "$OS_DISTRO" == "rhel" ]]; then + $SUDO /usr/local/lib64/uhd/utils/uhd_images_downloader.py + fi + fi popd rm -rf /tmp/uhd ) >& $uhd_install_log @@ -339,9 +350,14 @@ check_install_usrp_uhd_driver(){ if [[ "$OS_DISTRO" == "ubuntu" ]]; then #first we remove old installation $SUDO apt-get remove -y uhd || true - $SUDO apt-get remove libuhd-dev libuhd003 uhd-host -y || true + $SUDO apt-get remove libuhd-dev uhd-host libuhd003 libuhd3.13.1 libuhd3.14.0 libuhd3.14.1 libuhd3.15.0 libuhd4.0.0 libuhd4.1.0 -y || true v=$(lsb_release -cs) $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" + if [[ -v BUILD_UHD_FROM_SOURCE ]]; then + $SUDO apt-get install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-setuptools ninja-build + install_usrp_uhd_driver_from_source + return + fi # The new USRP repository # Raphael Defosseux: Adding a loop on adding PPA because in CI the gpg key retrieve may # timeout due to proxy / network latencies in Eurecom on VM @@ -361,7 +377,13 @@ check_install_usrp_uhd_driver(){ done $SUDO apt-get update $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev - $SUDO apt-get -y install libuhd-dev libuhd003 uhd-host + local distribution=$(get_distribution_release) + if [[ "$local distribution" == "ubuntu16.04" ]]; then + $SUDO apt-get -y install libuhd-dev libuhd3.15.0 uhd-host + fi + if [[ "$local distribution" == "ubuntu18.04" ]]; then + $SUDO apt-get -y install libuhd-dev libuhd4.1.0 uhd-host + fi elif [[ "$OS_BASEDISTRO" == "fedora" ]]; then if [ $IS_CONTAINER -eq 0 ] then @@ -692,6 +714,7 @@ check_install_oai_software() { build-essential \ $CMAKE \ cmake-curses-gui \ + curl \ ninja-build \ doxygen \ doxygen-gui \ diff --git a/doc/BUILD.md b/doc/BUILD.md index 166563877ef34dd7e4983057291e8ff69a5188f1..40b63ac697587fd2d4348dfeeb8e480ad3bd4cdf 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -88,6 +88,21 @@ You can build any oai softmodem executable separately, you may not need all of t After completing the build, the binaries are available in the `cmake_targets/ran_build/build` directory. A copy is also available in the `target/bin` directory, with all binaries suffixed by the 3GPP release number, today .Rel15. +When installing the pre-requisites, especially the `UHD` driver, you can now specify if you want to install from source or not. + +- For `fedora`-based OS, it was already the case all the time. But now you can specify which version to install. +- For `ubuntu` OS, the Ettus PPA currently installs the following versions: + * `Ubuntu16.04`: --> version `3.15.0.0` + * `Ubuntu18.04`: --> version `4.1.0.0` + +```bash +export BUILD_UHD_FROM_SOURCE=True +export UHD_VERSION=3.15.0.0 +./build_oai -I -w USRP +``` + +The `UHD_VERSION` env variable `SHALL` be a valid tag (minus `v`) from the `https://github.com/EttusResearch/uhd.git` repository. + ## Issue when building `nasmeh` module ## A lot of users and contributors have faced the issue: `nasmesh` module does not build. diff --git a/docker/Dockerfile.eNB.rhel8.2 b/docker/Dockerfile.eNB.rhel8.2 index 90c807fc0e3b0719ed52daad370d465e3a84d7e7..0522271df013f32bd9038186853d7c62149d2a45 100644 --- a/docker/Dockerfile.eNB.rhel8.2 +++ b/docker/Dockerfile.eNB.rhel8.2 @@ -41,17 +41,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters #start from scratch for target executable FROM registry.access.redhat.com/ubi8/ubi:latest as oai-enb +ENV TZ=Europe/Paris RUN yum update -y && \ yum install -y --enablerepo="ubi-8-codeready-builder" \ lksctp-tools \ nettle \ + tzdata \ procps-ng \ atlas \ + python3 \ + python3-pip \ net-tools \ iputils \ iproute \ libyaml && \ + 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 @@ -78,6 +84,8 @@ COPY --from=enb-build /lib64/libconfig.so.9 /lib64 COPY --from=enb-build /lib64/libblas.so.3 /lib64 COPY --from=enb-build /lib64/liblapack.so.3 /lib64 COPY --from=enb-build /lib64/liblapacke.so.3 /lib64 + +# Now we are copying from builder-image the UHD files. COPY --from=enb-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_filesystem.so.1.66.0 /lib64 @@ -88,7 +96,14 @@ COPY --from=enb-build /lib64/libboost_system.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=enb-build /lib64/libboost_timer.so.1.66.0 /lib64 -COPY --from=enb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 +COPY --from=enb-build /lib64/libboost_regex.so.1.66.0 /lib64 + +COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=enb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=enb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin + +WORKDIR /usr/local/share/uhd/rfnoc +COPY --from=enb-build /usr/local/share/uhd/rfnoc/ . RUN ldconfig diff --git a/docker/Dockerfile.eNB.ubuntu18 b/docker/Dockerfile.eNB.ubuntu18 index c4393dc78e6b16f027d9d760bfb3821d388eed52..cf748784e597a8780ffce23cf51ef647be601d1a 100644 --- a/docker/Dockerfile.eNB.ubuntu18 +++ b/docker/Dockerfile.eNB.ubuntu18 @@ -25,7 +25,7 @@ # #--------------------------------------------------------------------- -FROM ran-build:latest AS enb-build +FROM ran-build:latest AS enb-build RUN rm -Rf /oai-ran WORKDIR /oai-ran @@ -42,8 +42,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/enb_parameters #start from scratch for target executable FROM ubuntu:bionic as oai-enb ENV DEBIAN_FRONTEND=noninteractive -ENV TZ=Europe -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV TZ=Europe/Paris RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ @@ -60,16 +59,12 @@ RUN apt-get update && \ iputils-ping \ iproute2 \ iperf \ - 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 \ + python3 \ + python3-six \ + python3-requests \ libusb-1.0-0 \ - libuhd003 \ - uhd-host && \ + libyaml-0-2 && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/oai-enb/bin @@ -90,6 +85,17 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" COPY --from=enb-build /usr/local/lib/libprotobuf-c.so.1 . +# Now we are copying from builder-image the UHD files. +COPY --from=enb-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=enb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=enb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-enb/bin +WORKDIR /usr/lib/x86_64-linux-gnu +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 . +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 . +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . +COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . RUN ldconfig diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index 9ee0bf9ae9d52683895b6940909858c0b0df8696..b34a9d242d094776aa3f3c0782bccc4cde5650f7 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -41,6 +41,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters #start from scratch for target executable FROM registry.access.redhat.com/ubi8/ubi:latest as oai-gnb +ENV TZ=Europe/Paris RUN yum repolist --disablerepo=* && \ yum update -y && \ @@ -51,9 +52,14 @@ RUN yum repolist --disablerepo=* && \ atlas \ lksctp-tools \ nettle \ + tzdata \ + python3 \ + python3-pip \ net-tools \ iputils \ libyaml && \ + 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 @@ -84,6 +90,8 @@ COPY --from=gnb-build /lib64/libforms.so.2 /lib64 COPY --from=gnb-build /lib64/libblas.so.3 /lib64 COPY --from=gnb-build /lib64/liblapack.so.3 /lib64 COPY --from=gnb-build /lib64/liblapacke.so.3 /lib64 + +# Now we are copying from builder-image the UHD files. COPY --from=gnb-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_filesystem.so.1.66.0 /lib64 @@ -94,7 +102,14 @@ COPY --from=gnb-build /lib64/libboost_system.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=gnb-build /lib64/libboost_timer.so.1.66.0 /lib64 -COPY --from=gnb-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 +COPY --from=gnb-build /lib64/libboost_regex.so.1.66.0 /lib64 + +COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=gnb-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=gnb-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin + +WORKDIR /usr/local/share/uhd/rfnoc +COPY --from=gnb-build /usr/local/share/uhd/rfnoc/ . RUN ldconfig diff --git a/docker/Dockerfile.gNB.ubuntu18 b/docker/Dockerfile.gNB.ubuntu18 index 990c4363e5b98aad04ee852826937807b8883487..cfd9d8214491c3f0d4ac4d9cd16a42e775cecc4b 100644 --- a/docker/Dockerfile.gNB.ubuntu18 +++ b/docker/Dockerfile.gNB.ubuntu18 @@ -59,16 +59,12 @@ RUN apt-get update && \ net-tools \ iproute2 \ iputils-ping \ - 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 \ + python3 \ + python3-six \ + python3-requests \ libusb-1.0-0 \ - libuhd003 \ - uhd-host && \ + libyaml-0-2 && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/oai-gnb/bin @@ -93,6 +89,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" COPY --from=gnb-build /usr/local/lib/libprotobuf-c.so.1 . +# Now we are copying from builder-image the UHD files. +COPY --from=gnb-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=gnb-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=gnb-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin +WORKDIR /usr/lib/x86_64-linux-gnu +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 . +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 . +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . +COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . + RUN ldconfig # Copy the relevant configuration files for gNB diff --git a/docker/Dockerfile.lteRU.rhel8.2 b/docker/Dockerfile.lteRU.rhel8.2 index 314c01dff39eb3d46014216ad947929172915bd3..7e2a054a1291a08128e19b796ee2148b4d95571a 100644 --- a/docker/Dockerfile.lteRU.rhel8.2 +++ b/docker/Dockerfile.lteRU.rhel8.2 @@ -48,9 +48,13 @@ RUN yum update -y && \ tzdata \ procps-ng \ atlas \ + 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 @@ -66,11 +70,12 @@ COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 . COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . -# Copying from the ran-build image the USRP needed packages COPY --from=ru-build /lib64/libconfig.so.9 /lib64 COPY --from=ru-build /lib64/libblas.so.3 /lib64 COPY --from=ru-build /lib64/liblapack.so.3 /lib64 COPY --from=ru-build /lib64/liblapacke.so.3 /lib64 + +# Copying from the ran-build image the USRP needed packages COPY --from=ru-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_filesystem.so.1.66.0 /lib64 @@ -81,7 +86,14 @@ COPY --from=ru-build /lib64/libboost_system.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=ru-build /lib64/libboost_timer.so.1.66.0 /lib64 -COPY --from=ru-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 +COPY --from=ru-build /lib64/libboost_regex.so.1.66.0 /lib64 + +COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=ru-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=ru-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin + +WORKDIR /usr/local/share/uhd/rfnoc +COPY --from=ru-build /usr/local/share/uhd/rfnoc/ . RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ diff --git a/docker/Dockerfile.lteRU.ubuntu18 b/docker/Dockerfile.lteRU.ubuntu18 index fa99827d942ca3e9e5e566acbb75860fd14f5554..eafb8fa8af495631bdc0a6a88852422351ca0cc2 100644 --- a/docker/Dockerfile.lteRU.ubuntu18 +++ b/docker/Dockerfile.lteRU.ubuntu18 @@ -54,17 +54,13 @@ RUN apt-get update && \ libatlas3-base \ libconfig9 \ net-tools \ - iputils-ping \ - iproute2 && \ - # 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 \ + python3 \ + python3-six \ + python3-requests \ libusb-1.0-0 \ - libuhd003 \ - uhd-host && \ + iputils-ping \ + iproute2 && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/oai-lte-ru/bin @@ -78,6 +74,19 @@ COPY --from=ru-build /oai-ran/targets/bin/librfsimulator.so.Rel15 . COPY --from=ru-build /oai-ran/targets/bin/liboai_usrpdevif.so.Rel15 . COPY --from=ru-build /oai-ran/targets/bin/libparams_libconfig.so . COPY --from=ru-build /oai-ran/cmake_targets/ran_build/build/libdfts.so . + +# Now we are copying from builder-image the UHD files. +COPY --from=ru-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=ru-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=ru-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin +WORKDIR /usr/lib/x86_64-linux-gnu +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 . +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 . +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . +COPY --from=ru-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . + RUN /bin/bash -c "ln -s /usr/local/lib/liboai_eth_transpro.so.Rel15 /usr/local/lib/liboai_transpro.so" && \ /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so.Rel15 /usr/local/lib/liboai_device.so" && \ /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/librfsimulator.so" && \ diff --git a/docker/Dockerfile.lteUE.rhel8.2 b/docker/Dockerfile.lteUE.rhel8.2 index 936780297a6c8f1d5976e3fbe374dd15316aba70..a6814be1361333445c03e2d51a51bfbf943a84b4 100644 --- a/docker/Dockerfile.lteUE.rhel8.2 +++ b/docker/Dockerfile.lteUE.rhel8.2 @@ -42,17 +42,23 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet #start from scratch for target executable FROM registry.access.redhat.com/ubi8/ubi:latest as oai-lte-ue +ENV TZ=Europe/Paris RUN yum update -y && \ yum install -y --enablerepo="ubi-8-codeready-builder" \ lksctp-tools \ procps-ng \ nettle \ + tzdata \ atlas \ + python3 \ + python3-pip \ iproute \ net-tools \ iputils \ libyaml && \ + 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 @@ -82,6 +88,8 @@ COPY --from=lte-ue-build /lib64/libconfig.so.9 /lib64 COPY --from=lte-ue-build /lib64/libblas.so.3 /lib64 COPY --from=lte-ue-build /lib64/liblapack.so.3 /lib64 COPY --from=lte-ue-build /lib64/liblapacke.so.3 /lib64 + +# Now we are copying from builder-image the UHD files. COPY --from=lte-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64 @@ -92,7 +100,14 @@ COPY --from=lte-ue-build /lib64/libboost_system.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=lte-ue-build /lib64/libboost_timer.so.1.66.0 /lib64 -COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 +COPY --from=lte-ue-build /lib64/libboost_regex.so.1.66.0 /lib64 + +COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=lte-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=lte-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin + +WORKDIR /usr/local/share/uhd/rfnoc +COPY --from=lte-ue-build /usr/local/share/uhd/rfnoc/ . RUN ldconfig diff --git a/docker/Dockerfile.lteUE.ubuntu18 b/docker/Dockerfile.lteUE.ubuntu18 index 34cbe651adc90fcae4150080148b4468455be982..6d54ab08fc79ca8f38bca7e181df123f336c47f0 100644 --- a/docker/Dockerfile.lteUE.ubuntu18 +++ b/docker/Dockerfile.lteUE.ubuntu18 @@ -43,8 +43,7 @@ RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/lte_ue_paramet #start from scratch for target executable FROM ubuntu:bionic as oai-lte-ue ENV DEBIAN_FRONTEND=noninteractive -ENV TZ=Europe -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV TZ=Europe/Paris RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ @@ -58,19 +57,15 @@ RUN apt-get update && \ libconfig9 \ openssl \ net-tools \ + python \ + python3 \ + python3-six \ + python3-requests \ + libusb-1.0-0 \ iputils-ping \ iproute2 \ iperf \ 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-ue/bin @@ -95,6 +90,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li COPY --from=lte-ue-build /usr/local/lib/libprotobuf-c.so.1 . +# Now we are copying from builder-image the UHD files. +COPY --from=lte-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=lte-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=lte-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ue/bin +WORKDIR /usr/lib/x86_64-linux-gnu +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 . +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 . +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . +COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . + RUN ldconfig # Copy the relevant configuration files for UE diff --git a/docker/Dockerfile.nrUE.rhel8.2 b/docker/Dockerfile.nrUE.rhel8.2 index 56fc746adeb53cc0336ca28b88f80cd068b6d4b9..ec74d1194018d134f1558d0fc3f5345d37c45383 100644 --- a/docker/Dockerfile.nrUE.rhel8.2 +++ b/docker/Dockerfile.nrUE.rhel8.2 @@ -51,9 +51,13 @@ RUN yum update -y && \ iputils \ iproute \ atlas \ + python3 \ + python3-pip \ libXpm \ libX11 \ libyaml && \ + 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 @@ -87,6 +91,8 @@ COPY --from=nr-ue-build /lib64/libblas.so.3 /lib64 COPY --from=nr-ue-build /lib64/liblapack.so.3 /lib64 COPY --from=nr-ue-build /lib64/liblapacke.so.3 /lib64 COPY --from=nr-ue-build /lib64/libforms.so.2 /lib64 + +# Now we are copying from builder-image the UHD files. COPY --from=nr-ue-build /lib64/libboost_chrono.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_date_time.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_filesystem.so.1.66.0 /lib64 @@ -97,7 +103,15 @@ COPY --from=nr-ue-build /lib64/libboost_system.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_unit_test_framework.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_atomic.so.1.66.0 /lib64 COPY --from=nr-ue-build /lib64/libboost_timer.so.1.66.0 /lib64 -COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.4.0.0 /usr/local/lib64 +COPY --from=nr-ue-build /lib64/libboost_regex.so.1.66.0 /lib64 + +COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=nr-ue-build /usr/local/lib64/libuhd.so.3.15.0 /usr/local/lib64 +COPY --from=nr-ue-build /usr/local/lib64/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin + +WORKDIR /usr/local/share/uhd/rfnoc +COPY --from=nr-ue-build /usr/local/share/uhd/rfnoc/ . + RUN ldconfig diff --git a/docker/Dockerfile.nrUE.ubuntu18 b/docker/Dockerfile.nrUE.ubuntu18 index fc30af7286f9f93af74f2762fba9ad7fac164d28..49e3f3213ba779cd78e0e0c55eecba3acb80ae3e 100644 --- a/docker/Dockerfile.nrUE.ubuntu18 +++ b/docker/Dockerfile.nrUE.ubuntu18 @@ -55,19 +55,15 @@ RUN apt-get update && \ libconfig9 \ openssl \ net-tools \ + python \ + python3 \ + python3-six \ + python3-requests \ + libusb-1.0-0 \ iputils-ping \ iproute2 \ iperf \ 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-nr-ue/bin @@ -95,6 +91,18 @@ RUN /bin/bash -c "ln -s /usr/local/lib/librfsimulator.so.Rel15 /usr/local/lib/li COPY --from=nr-ue-build /usr/local/lib/libprotobuf-c.so.1 . +# Now we are copying from builder-image the UHD files. +COPY --from=nr-ue-build /usr/local/bin/uhd_find_devices /usr/local/bin +COPY --from=nr-ue-build /usr/local/lib/libuhd.so.3.15.0 /usr/local/lib +COPY --from=nr-ue-build /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-nr-ue/bin +WORKDIR /usr/lib/x86_64-linux-gnu +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1 . +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1 . +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 . +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 . +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 . +COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 . + RUN ldconfig WORKDIR /opt/oai-nr-ue diff --git a/docker/Dockerfile.ran.rhel8.2 b/docker/Dockerfile.ran.rhel8.2 index 3972fd0c35ffb054a5af11a9479753d68f077368..4d15220ca8f4c8c9c6ed53285975d13bc766bf76 100644 --- a/docker/Dockerfile.ran.rhel8.2 +++ b/docker/Dockerfile.ran.rhel8.2 @@ -28,6 +28,9 @@ FROM registry.access.redhat.com/ubi8/ubi:latest AS ran-build ARG NEEDED_GIT_PROXY +ENV TZ=Europe/Paris +ENV BUILD_UHD_FROM_SOURCE=True +ENV UHD_VERSION=3.15.0.0 COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca COPY tmp/entitlement/*.pem /etc/pki/entitlement diff --git a/docker/Dockerfile.ran.ubuntu18 b/docker/Dockerfile.ran.ubuntu18 index 4b296408fd8d5747533e02e55ca13ebd2308290f..3ef81ec030235f58634b89864e3f8896d24b74fc 100644 --- a/docker/Dockerfile.ran.ubuntu18 +++ b/docker/Dockerfile.ran.ubuntu18 @@ -29,8 +29,9 @@ FROM ubuntu:bionic AS ran-build ARG NEEDED_GIT_PROXY ENV DEBIAN_FRONTEND=noninteractive -ENV TZ=Europe -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +ENV TZ=Europe/Paris +ENV BUILD_UHD_FROM_SOURCE=True +ENV UHD_VERSION=3.15.0.0 #install developers pkg/repo RUN apt-get update && \ diff --git a/docker/scripts/enb_entrypoint.sh b/docker/scripts/enb_entrypoint.sh index 2e8886e8558071a79482a439ef726af5b7a69b87..ff92e3c86f817932cb55f0a1e25843871ab8119e 100755 --- a/docker/scripts/enb_entrypoint.sh +++ b/docker/scripts/enb_entrypoint.sh @@ -46,11 +46,11 @@ done # Load the USRP binaries if [[ -v USE_B2XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx + $PREFIX/bin/uhd_images_downloader.py -t b2xx elif [[ -v USE_X3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx + $PREFIX/bin/uhd_images_downloader.py -t x3xx elif [[ -v USE_N3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx + $PREFIX/bin/uhd_images_downloader.py -t n3xx fi echo "==================================" diff --git a/docker/scripts/gnb_entrypoint.sh b/docker/scripts/gnb_entrypoint.sh index 678ec6cb1bd0e5ca00bac201fd0b5dfdafa3fca1..05b42d76bbbe0bcbcb056152e5563eed72b6f4b4 100755 --- a/docker/scripts/gnb_entrypoint.sh +++ b/docker/scripts/gnb_entrypoint.sh @@ -37,11 +37,11 @@ done # Load the USRP binaries if [[ -v USE_B2XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx + $PREFIX/bin/uhd_images_downloader.py -t b2xx elif [[ -v USE_X3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx + $PREFIX/bin/uhd_images_downloader.py -t x3xx elif [[ -v USE_N3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx + $PREFIX/bin/uhd_images_downloader.py -t n3xx fi echo "==================================" diff --git a/docker/scripts/lte_ru_entrypoint.sh b/docker/scripts/lte_ru_entrypoint.sh index f466e25ec28a30acad6af2d4bea9a5743859e7a5..93122b0d029ca94ff824fc52daa563042785ef11 100755 --- a/docker/scripts/lte_ru_entrypoint.sh +++ b/docker/scripts/lte_ru_entrypoint.sh @@ -35,11 +35,11 @@ done # Load the USRP binaries if [[ -v USE_B2XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx + $PREFIX/bin/uhd_images_downloader.py -t b2xx elif [[ -v USE_X3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx + $PREFIX/bin/uhd_images_downloader.py -t x3xx elif [[ -v USE_N3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx + $PREFIX/bin/uhd_images_downloader.py -t n3xx fi echo "==================================" diff --git a/docker/scripts/lte_ue_entrypoint.sh b/docker/scripts/lte_ue_entrypoint.sh index 235128f73855aea4452d89940ea64d640e844e6d..de7ae8b496e70b24597f4e1ceb9d48e677d7f35b 100755 --- a/docker/scripts/lte_ue_entrypoint.sh +++ b/docker/scripts/lte_ue_entrypoint.sh @@ -39,11 +39,11 @@ $PREFIX/bin/conf2uedata -c $PREFIX/etc/ue_usim.conf -o $PREFIX # Load the USRP binaries if [[ -v USE_B2XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx + $PREFIX/bin/uhd_images_downloader.py -t b2xx elif [[ -v USE_X3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx + $PREFIX/bin/uhd_images_downloader.py -t x3xx elif [[ -v USE_N3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx + $PREFIX/bin/uhd_images_downloader.py -t n3xx fi # in case we have conf file, append diff --git a/docker/scripts/nr_ue_entrypoint.sh b/docker/scripts/nr_ue_entrypoint.sh index 691258b8fa9e30a732a1c6904a4404cd82934913..91d25c9e1eec3cc71db9424a87d1218c3acc7176 100755 --- a/docker/scripts/nr_ue_entrypoint.sh +++ b/docker/scripts/nr_ue_entrypoint.sh @@ -34,11 +34,11 @@ done # Load the USRP binaries if [[ -v USE_B2XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t b2xx + $PREFIX/bin/uhd_images_downloader.py -t b2xx elif [[ -v USE_X3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t x3xx + $PREFIX/bin/uhd_images_downloader.py -t x3xx elif [[ -v USE_N3XX ]]; then - /usr/lib/uhd/utils/uhd_images_downloader.py -t n3xx + $PREFIX/bin/uhd_images_downloader.py -t n3xx fi # in case we have conf file, append