From 6b40099c17109efb39119df366c1d0002bf74dd0 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Thu, 29 Aug 2024 15:17:01 +0100 Subject: [PATCH 1/3] Build all images Signed-off-by: Jiaxun Yang --- .github/workflows/docker-publish.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5ac616c1..ca6d367f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -16,14 +16,49 @@ jobs: include: - image: docker_open5gs context: base + file: Dockerfile - image: docker_kamailio context: ims_base + file: Dockerfile - image: docker_srslte context: srslte + file: Dockerfile - image: docker_srsran context: srsran + file: Dockerfile - image: docker_ueransim context: ueransim + file: Dockerfile + - image: docker_dns + context: dns + file: Dockerfile + - image: docker_mysql + context: mysql + file: Dockerfile + - image: docker_pyhss + context: pyhss + file: Dockerfile + - image: docker_osmomsc + context: osmomsc + file: Dockerfile + - image: docker_osmohlr + context: osmohlr + file: Dockerfile + - image: docker_metrics + context: metrics + file: Dockerfile + - image: docker_grafana + context: grafana + file: Dockerfile + - image: docker_rtpengine + context: rtpengine + file: Dockerfile + - image: docker_oai_enb + context: oai + file: enb_dockerfile + - image: docker_oai_gnb + context: oai + file: gnb_dockerfile runs-on: ubuntu-latest permissions: @@ -66,6 +101,7 @@ jobs: uses: docker/build-push-action@v6 with: context: ${{ matrix.context }} + file: ${{ matrix.context }}/${{ matrix.file }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 792c171257d993c9ec6db69bc6bd9bb6b98115d0 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Thu, 29 Aug 2024 15:53:44 +0100 Subject: [PATCH 2/3] Fix OAI build Upgrade to Ubuntu jammy so we have new limesuite and soapysdr in system repo. Use fixed v2.1 base. Build UHD from source so that TDD patch will be applied. Signed-off-by: Jiaxun Yang --- oai/enb_dockerfile | 26 ++++++++++---------------- oai/gnb_dockerfile | 28 +++++++++++----------------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/oai/enb_dockerfile b/oai/enb_dockerfile index 181f0810..d0633095 100644 --- a/oai/enb_dockerfile +++ b/oai/enb_dockerfile @@ -27,28 +27,21 @@ FROM ubuntu:focal ENV DEBIAN_FRONTEND=noninteractive +ENV BUILD_UHD_FROM_SOURCE=True +ENV UHD_VERSION=4.4.0.0 # Install updates and dependencies RUN apt-get update && \ - apt-get -y install cmake git subversion software-properties-common apt-utils unzip xxd - -# Install dependencies to build SoapySDR and Lime Suite -RUN add-apt-repository -y ppa:myriadrf/drivers && \ - apt update && \ - apt -y install libi2c-dev libusb-1.0-0-dev git g++ cmake libsqlite3-dev libwxgtk3.0-gtk3-dev freeglut3-dev \ - python3-distutils gnuplot libfltk1.3-dev liboctave-dev libz-dev - -# Install LimeSuite -RUN git clone https://github.com/myriadrf/LimeSuite.git && \ - cd LimeSuite && \ - git checkout tags/v20.10.0 -b v20.10.0 && \ - mkdir builddir && cd builddir && cmake .. && \ - make -j`nproc` && make install && ldconfig && \ - cd ../udev-rules && sh ./install.sh + apt-get -y install build-essential cmake git subversion software-properties-common apt-utils unzip xxd iproute2 + +# Install SoapySDR and Lime Suite +RUN apt-get update && \ + apt-get -y install limesuite liblimesuite-dev limesuite-udev \ + soapysdr-tools soapysdr-module-lms7 # Cloning RAN repository (eNB RAN + UE RAN) RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git && \ - cd openairinterface5g/ && git checkout develop + cd openairinterface5g/ && git checkout v2.1.0 # Set the working directory to openairinterface5g WORKDIR openairinterface5g @@ -56,5 +49,6 @@ WORKDIR openairinterface5g RUN . ./oaienv && cd cmake_targets && \ ./build_oai -I -w USRP --eNB --verbose-compile + CMD . ./oaienv && /mnt/oai/oai_init.sh && cd cmake_targets/lte_build_oai/build && \ ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf -d diff --git a/oai/gnb_dockerfile b/oai/gnb_dockerfile index 208aca66..d202c712 100644 --- a/oai/gnb_dockerfile +++ b/oai/gnb_dockerfile @@ -24,30 +24,24 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM ubuntu:focal +FROM ubuntu:jammy ENV DEBIAN_FRONTEND=noninteractive +ENV BUILD_UHD_FROM_SOURCE=True +ENV UHD_VERSION=4.4.0.0 # Install updates and dependencies RUN apt-get update && \ - apt-get -y install cmake git subversion software-properties-common apt-utils unzip xxd -# Install dependencies to build SoapySDR and Lime Suite -RUN add-apt-repository -y ppa:myriadrf/drivers && \ - apt update && \ - apt -y install libi2c-dev libusb-1.0-0-dev git g++ cmake libsqlite3-dev libwxgtk3.0-gtk3-dev freeglut3-dev \ - python3-distutils gnuplot libfltk1.3-dev liboctave-dev libz-dev - -# Install LimeSuite -RUN git clone https://github.com/myriadrf/LimeSuite.git && \ - cd LimeSuite && \ - git checkout tags/v20.10.0 -b v20.10.0 && \ - mkdir builddir && cd builddir && cmake .. && \ - make -j`nproc` && make install && ldconfig && \ - cd ../udev-rules && sh ./install.sh + apt-get -y install build-essential cmake git subversion software-properties-common apt-utils unzip xxd iproute2 + +# Install SoapySDR and Lime Suite +RUN apt-get update && \ + apt-get -y install limesuite liblimesuite-dev limesuite-udev \ + soapysdr-tools soapysdr-module-lms7 # Cloning RAN repository (eNB RAN + UE RAN) RUN git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git && \ - cd openairinterface5g/ && git checkout develop + cd openairinterface5g/ && git checkout v2.1.0 # Set the working directory to openairinterface5g WORKDIR openairinterface5g @@ -55,5 +49,5 @@ WORKDIR openairinterface5g RUN . ./oaienv && cd cmake_targets && \ ./build_oai -I -w USRP --gNB --verbose-compile -CMD . ./oaienv && apt install -y iproute2 && /mnt/oai/oai_init.sh && cd cmake_targets/ran_build/build && \ +CMD . ./oaienv && /mnt/oai/oai_init.sh && cd cmake_targets/ran_build/build && \ ./nr-softmodem -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.52PRB.usrpb210.conf --sa -d From c739b9d0e344c407032378291165edd073223e01 Mon Sep 17 00:00:00 2001 From: Jiaxun Yang Date: Thu, 29 Aug 2024 17:00:12 +0100 Subject: [PATCH 3/3] README.md: Docuemnt how to pull prebuilt images Signed-off-by: Jiaxun Yang --- README.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 64a95f4b..5a9c9241 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,75 @@ RF simulated setups: - srsRAN (gNB + UE) simulation over ZMQ - UERANSIM (gNB + UE) simulator -## Building docker images +## Prepare Docker images * Mandatory requirements: * [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu) - Version 22.0.5 or above * [docker compose](https://docs.docker.com/compose) - Version 2.14 or above +You can either pull the pre-built docker images or build them from the source. +### Get Pre-built Docker images + +Pull base images: +``` +docker pull ghcr.io/herlesupreeth/docker_open5gs:master +docker tag ghcr.io/herlesupreeth/docker_open5gs:master docker_open5gs + +docker pull ghcr.io/herlesupreeth/docker_grafana:master +docker tag ghcr.io/herlesupreeth/docker_grafana:master docker_grafana + + +docker pull ghcr.io/herlesupreeth/docker_metrics:master +docker tag ghcr.io/herlesupreeth/docker_metrics:master docker_metrics +``` + +You can also pull the pre-built images for additional components + +For IMS components: +``` +docker pull ghcr.io/herlesupreeth/docker_osmohlr:master +docker tag ghcr.io/herlesupreeth/docker_osmohlr:master docker_osmohlr + +docker pull ghcr.io/herlesupreeth/docker_osmomsc:master +docker tag ghcr.io/herlesupreeth/docker_osmomsc:master docker_osmomsc + +docker pull ghcr.io/herlesupreeth/docker_pyhss:master +docker tag ghcr.io/herlesupreeth/docker_pyhss:master docker_pyhss + +docker pull ghcr.io/herlesupreeth/docker_kamailio:master +docker tag ghcr.io/herlesupreeth/docker_kamailio:master docker_kamailio + +docker pull ghcr.io/herlesupreeth/docker_mysql:master +docker tag ghcr.io/herlesupreeth/docker_mysql:master docker_mysql + +``` + +For srsRAN components: +``` +docker pull ghcr.io/herlesupreeth/docker_srslte:master +docker tag ghcr.io/herlesupreeth/docker_srslte:master docker_srslte + +docker pull ghcr.io/herlesupreeth/docker_srsran:master +docker tag ghcr.io/herlesupreeth/docker_srsran:master docker_srsran +``` + +For UERANSIM components: +``` +docker pull ghcr.io/herlesupreeth/docker_nr-gnb:master +docker tag ghcr.io/herlesupreeth/docker_nr-gnb:master docker_nr-gnb +``` + +For OAI components: +``` +docker pull ghcr.io/herlesupreeth/docker_oai_enb:master +docker tag ghcr.io/herlesupreeth/docker_oai_enb:master docker_oai_enb + +docker pull ghcr.io/herlesupreeth/docker_oai_ue:master +docker tag ghcr.io/herlesupreeth/docker_oai_ue:master docker_oai_ue +``` + +### Build Docker images from source #### Clone repository and build base docker image of open5gs, kamailio, srsRAN_4G, srsRAN_Project, ueransim ```