Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ao gleen
OpenXG-RAN
Commits
fe866405
Commit
fe866405
authored
Jul 10, 2024
by
arora
Committed by
Robert Schmidt
Jul 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the build strategy documentation
- adding information related to 7.2 images - correcting typos and syntax
parent
5524b2c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
46 deletions
+66
-46
docker/README.md
docker/README.md
+66
-46
No files found.
docker/README.md
View file @
fe866405
...
@@ -33,29 +33,30 @@ For all platforms, the strategy for building docker/podman images is the same:
...
@@ -33,29 +33,30 @@ For all platforms, the strategy for building docker/podman images is the same:
into which all targets are compiled.
into which all targets are compiled.
*
Then from the
`ran-build`
shared image, we can build target images for:
*
Then from the
`ran-build`
shared image, we can build target images for:
-
eNB
-
eNB
-
gNB (with UHD)
-
gNB
/DU
(with UHD)
-
gNB (with AW2S), only on RHEL9
-
gNB
/DU
(with AW2S), only on RHEL9
-
lte-UE
-
lte-UE
-
nr-UE
-
nr-UE
-
nr-cuup
These target images will only contain:
These target images will only contain:
-
the generated executable (for example
`lte-softmodem`
)
-
the generated executable (for example
`lte-softmodem`
)
-
the generated shared libraries (for example
`liboai_usrpdevif.so`
)
-
the generated shared libraries (for example
`liboai_usrpdevif.so`
)
-
the needed libraries and packages to run these generated binaries
-
the needed libraries and packages to run these generated binaries
-
Some configuration file templates
-
Some configuration file templates
-
Some tools (such as
`ping`
,
`ifconfig`
)
-
Some tools (such as
`ping`
,
`ifconfig`
)
*
From the
`ran-build-fhi72`
image, we can build target image for:
-
gNB/DU (with FHI 7.2)
Note that on every push to develop (i.e., typically after integrating merge
Note that on every push to develop (i.e., typically after integrating merge
requests), we build all images and push them to
[
Docker Hub
](
https://hub.docker.com/u/oaisoftwarealliance
)
. To pull them, do
requests), we build all images and push them to
[
Docker Hub
](
https://hub.docker.com/u/oaisoftwarealliance
)
. To pull them, do
```
```
bash
docker pull oaisoftwarealliance/oai-gnb:develop
docker pull oaisoftwarealliance/oai-gnb:develop
docker pull oaisoftwarealliance/oai-nr-ue:develop
docker pull oaisoftwarealliance/oai-nr-ue:develop
docker pull oaisoftwarealliance/oai-enb:develop
docker pull oaisoftwarealliance/oai-enb:develop
docker pull oaisoftwarealliance/oai-lte-ue:develop
docker pull oaisoftwarealliance/oai-lte-ue:develop
```
```
Have a look at
[
this README
](
../ci-scripts/yaml_files/5g_rfsimulator/README.md
)
to get some
Have a look at
[
this README
](
../ci-scripts/yaml_files/5g_rfsimulator/README.md
)
to get some information on how to use the images.
information on how to use the images.
# 2. File organization #
# 2. File organization #
...
@@ -65,18 +66,20 @@ Targets can be:
...
@@ -65,18 +66,20 @@ Targets can be:
-
`base`
for an image named
`ran-base`
(shared image)
-
`base`
for an image named
`ran-base`
(shared image)
-
`build`
for an image named
`ran-build`
(shared image)
-
`build`
for an image named
`ran-build`
(shared image)
-
`build.fhi72`
for an image named
`ran-build-fhi72`
-
`eNB`
for an image named
`oai-enb`
-
`eNB`
for an image named
`oai-enb`
-
`gNB`
for an image named
`oai-gnb`
-
`gNB`
for an image named
`oai-gnb`
-
`nr-cuup`
for an image named
`oai-nr-cuup`
-
`nr-cuup`
for an image named
`oai-nr-cuup`
-
`gNB.aw2s`
for an image named
`oai-gnb-aw2s`
-
`gNB.aw2s`
for an image named
`oai-gnb-aw2s`
-
`gNB.fhi`
for an image named
`oai-gnb-fhi72`
-
`lteUE`
for an image named
`oai-lte-ue`
-
`lteUE`
for an image named
`oai-lte-ue`
-
`nrUE`
for an image named
`oai-nr-ue`
-
`nrUE`
for an image named
`oai-nr-ue`
The currently-supported OS are:
The currently-supported OS are:
-
`rhel9`
for Red Hat Ent
reprise Linux (including images for an OpenShift cluster)
-
`rhel9`
for Red Hat Ent
erprise Linux and Openshift Universal Base Image
-
`ubuntu22`
for Ubuntu 22.04 LTS
-
`ubuntu22`
for Ubuntu 22.04 LTS
-
`rocky`
for Rocky-Linux
8.7
-
`rocky`
for Rocky-Linux
9
For more details regarding the build on an Openshift Cluster, see
[
OpenShift README
](
../openshift/README.md
)
.
For more details regarding the build on an Openshift Cluster, see
[
OpenShift README
](
../openshift/README.md
)
.
...
@@ -95,25 +98,28 @@ There are two shared images: one that has all dependencies, and a second that co
...
@@ -95,25 +98,28 @@ There are two shared images: one that has all dependencies, and a second that co
```
bash
```
bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd
openairinterface5g
cd
openairinterface5g
git checkout develop
# default branch is develop, to change use git checkout <BRANCH>
docker build
--target
ran-base
--tag
ran-base:latest
--file
docker/Dockerfile.base.ubuntu22
.
docker build
--target
ran-base
--tag
ran-base:latest
--file
docker/Dockerfile.base.ubuntu22
.
# if you want use USRP, AW2S and RFSimulator radios
docker build
--target
ran-build
--tag
ran-build:latest
--file
docker/Dockerfile.build.ubuntu22
.
docker build
--target
ran-build
--tag
ran-build:latest
--file
docker/Dockerfile.build.ubuntu22
.
# if you want to use front-haul 7.2 and RFSimulator radios
docker build
--tag
ran-build-fhi72:latest
--file
docker/Dockerfile.build.fhi72.ubuntu22 .
```
```
After building
both
:
After building:
```
bash
```
bash
docker image
ls
docker image
ls
REPOSITORY TAG IMAGE ID CREATED SIZE
REPOSITORY TAG IMAGE ID CREATED SIZE
ran-build latest f2633a7f5102 1 minute ago 6.81GB
ran-build latest f2633a7f5102 1 minute ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB
ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB
ran-build-fhi72 latest 5190c06dbb4d 1 minute ago 6.86GB
...
...
```
```
Note that the steps are identical for
`rocky-linux`
.
Note that the steps are identical for
`rocky-linux`
.
### 3.2.1. Additional build otions
### 3.2.1. Additional build o
p
tions
This is only available for the Ubuntu version of Dockerfiles.
This is only available for the Ubuntu version of Dockerfiles.
...
@@ -149,13 +155,18 @@ For example, the eNB:
...
@@ -149,13 +155,18 @@ For example, the eNB:
docker build
--target
oai-enb
--tag
oai-enb:latest
--file
docker/Dockerfile.eNB.ubuntu22 .
docker build
--target
oai-enb
--tag
oai-enb:latest
--file
docker/Dockerfile.eNB.ubuntu22 .
```
```
To build gNB/DU with 7.2 fronthaul support:
```
bash
docker build
--target
oai-gnb-fhi72
--tag
oai-gnb-fhi72:latest
--file
docker/Dockerfile.gNB.fhi72.ubuntu22 .
```
After a while:
After a while:
```
```
docker image ls
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
REPOSITORY TAG IMAGE ID CREATED SIZE
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
<none> <none> 875ea3b05b60 8 minutes ago 8.18GB
ran-build latest f2633a7f5102 1 hour ago 6.81GB
ran-build latest f2633a7f5102 1 hour ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB
ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB
```
```
...
@@ -176,16 +187,33 @@ docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.
...
@@ -176,16 +187,33 @@ docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.
Normally the target image will be around 200 Mbytes bigger.
Normally the target image will be around 200 Mbytes bigger.
# 4. Building using `podman` under Red Hat Entreprise Linux
8.2
#
# 4. Building using `podman` under Red Hat Entreprise Linux
9.X
#
Analogous to the above steps:
Analogous to the above steps:
```
bash
podman build
--target
ran-base
--tag
ran-base:latest
--file
docker/Dockerfile.base.rhel9
.
# if you want use USRP, AW2S and RFSimulator radios
podman build
--target
ran-build
--tag
ran-build:latest
--file
docker/Dockerfile.build.rhel9
.
# if you want to use front-haul 7.2 and RFSimulator radios
podman build
--tag
ran-build-fhi72:latest
--file
docker/Dockerfile.build.fhi72.rhel9 .
```
```
sudo podman build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.rhel9 .
sudo podman build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.rhel9 .
## 4.1 Building target images
sudo podman build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.rhel9 .
For example, the eNB:
```
bash
podman build
--target
oai-enb
--tag
oai-gnb:latest
--file
docker/Dockerfile.eNB.rhel9 .
```
```
# 5. Running modems using `docker` under Ubuntu 18.04 #
To build gNB/DU with 7.2 fronthaul support:
```
bash
podman build
--target
oai-gnb-fhi72
--tag
oai-gnb-fhi72:latest
--file
docker/Dockerfile.gNB.fhi72.rhel9 .
```
# 5. Running modems using `docker` under Ubuntu #
The easiest is to run them from a
`docker-compose`
file, which is used by the
The easiest is to run them from a
`docker-compose`
file, which is used by the
CI to test OAI. Some folders under
`ci-scripts/yaml_files`
have a README that
CI to test OAI. Some folders under
`ci-scripts/yaml_files`
have a README that
...
@@ -200,55 +228,47 @@ file](../ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml).
...
@@ -200,55 +228,47 @@ file](../ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml).
It is also possible to mount your own configuration file. The following
It is also possible to mount your own configuration file. The following
docker-compose file can be used to start a gNB using a B210 and your own
docker-compose file can be used to start a gNB using a B210 and your own
config, located at
`/tmp/gnb.conf`
:
config, located at
`/tmp/gnb.conf`
:
```
version: '3.8'
```
yaml
services
:
services
:
gnb_mono_tdd
:
gnb_mono_tdd
:
image
:
oai-gnb:latest
image
:
oai-gnb:latest
privileged: true
container_name
:
sa-b200-gnb
container_name
:
sa-b200-gnb
cap_drop
:
-
ALL
cap_add
:
-
SYS_NICE
-
IPC_LOCK
ulimits
:
core
:
-1
# for core dumps
environment
:
environment
:
USE_B2XX
:
'
yes'
USE_B2XX
:
'
yes'
USE_ADDITIONAL_OPTIONS: --sa -E --continuous-tx
USE_ADDITIONAL_OPTIONS
:
--sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function
devices
:
-
/dev/bus/usb/:/dev/bus/usb/
volumes
:
volumes
:
- /dev:/dev
-
../../conf_files/gnb.sa.band78.51prb.usrpb200.conf:/opt/oai-gnb/etc/gnb.conf
- /tmp/gnb.conf:/opt/oai-gnb/etc/gnb.conf
# for performance reasons, we use host mode: in bridge mode, we have
networks:
# unacceptable DL TCP performance. However, the whole point of
public_net:
# containerization is to not be in host mode, so update this to macvlan
ipv4_address: 192.168.68.194
# later.
network_mode
:
"
host"
#entrypoint: /bin/bash -c "sleep infinity"
healthcheck
:
healthcheck
:
# pgrep does NOT work
# pgrep does NOT work
test
:
/bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
test
:
/bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
interval
:
10s
interval
:
10s
timeout
:
5s
timeout
:
5s
retries
:
5
retries
:
5
networks:
public_net:
name: sa-b200-gnb-net
ipam:
config:
- subnet: 192.168.68.192/26
driver_opts:
com.docker.network.bridge.name: "sa-gnb-net"
```
```
You should also change the
`image`
to the right image name and tag of the gNB
You should also change the
`image`
to the right image name and tag of the gNB
you are using. Start like this:
you are using. Start like this:
```
```
bash
docker-compose up
# gNB in foreground
docker-compose up
# gNB in foreground
docker-compose up
-d
# gNB in background
docker-compose up
-d
# gNB in background
```
```
Stop it like this (in both cases):
Stop it like this (in both cases):
```
```
bash
docker-compose down
docker-compose down
```
```
Note that in the above case, ALL devices are passed into the container (by
mounting
`/dev`
), which allows the container to access all devices connected to
the host!
# 6. Running modems using `podman` under Red Hat Entreprise Linux 8.2 #
TODO.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment