Get Started - chaeyoung-lee/Agora GitHub Wiki
Building Agora
Native
On ecl-comp-data
server, most libraries needed to run Agora are already installed in /opt
(do not modify). At first-time setup, you'll need to run a few setup scripts to load these libraries.
$ ./config_ci.sh # setup ci
$ ./scripts/ubuntu.sh # install linux packages
$ source /opt/intel/oneapi/setvars.sh # Source Intel OneAPI Toolkits
As described in README.md
, build Agora by running
$ cd Agora
$ mkdir build
$ cd build
$ cmake ..
$ make -j
Test if everything is setup correctly. You must pass all tests.
$ ./test/test_agora/test_agora.sh 10 out
Docker
Run Agora on Docker. Use Dockerfile
to build the Docker image and run a container.
$ cd Agora/docker
$ docker build -t [tag name] . # [tag name] e.g. agora
$ docker run -it --name [container name] --shm-size 16G --publish \6666:\6666 --volume /path/to/Agora:/Agora agora:latest
It's easier to work inside the Docker container using tmux
so that you don't accidently exit from the container. You can detach the Docker container using ctrl+p, ctrl+q
. Some useful Docker commands are
docker ps
: lists all running containersdocker images
: lists all built imagesdocker rmi [id]
: remove imagedocker rm [id]
: remove container
$ apt-get -y install -y ncurses-term
$ wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18236/l_BaseKit_p_2021.4.0.3422.sh
$ sudo bash l_BaseKit_p_2021.4.0.3422.sh
Install the Intel oneAPI toolkits including the Math Kernel Library (MKL) by running the GUI. After the installation is complete, set the environment variables by running
$ source /opt/intel/oneapi/setvars.sh --force
No need to re-run this at later logins, since this line is included in the ~/.bashrc
through Dockerfile
.
Troubleshooting
GCC Error
If you encounter an error such as
./build/agora: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ./build/agora)
installing the gcc-9
and libstdc++6
might help.
$ apt-get -y install -y software-properties-common
$ add-apt-repository ppa:ubuntu-toolchain-r/test
$ apt -y update && apt-get -y install -y -y gcc-9 libstdc++6
ICC Error
In file included from /Agora/src/common/modulation.cc:1:
/Agora/src/common/modulation.h:10:10: fatal error: common_typedef_sdk.h: No such file or directory
10 | #include "common_typedef_sdk.h"
error occurs when the Intel C++ compiler icc
is not installed. icc
can be installed as part of Intel oneAPI HPC Toolkit from here or as following.
Download
$ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
$ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
$ sudo apt-get update
$ sudo apt install -y intel-hpckit
Configure
$ echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bashrc
FlexRAN
Download Intel FlexRAN's FEC SDK for LDPC encoding and decoding. (WARNING: for ICC >= 19.04, a special version of FlexRAN patch should be used - contact Agora developers for a copy).
Build
$ sudo chmod -R a+rwX FlexRAN-FEC-SDK-19-04/ # Allow all users read-write access
$ cd /opt/FlexRAN-FEC-SDK-19-04/sdk/
$ sed -i '/add_compile_options("-Wall")/a \ \ add_compile_options("-ffreestanding")' cmake/intel-compile-options.cmake
$ ./create-makefiles-linux.sh
$ WIRELESS_SDK_TARGET_ISA="avx512" # or "avx2"
$ export WIRELESS_SDK_TARGET_ISA
$ cd build-avx512-icc # or build-avx2-icc
$ make -j
GNU
For avx512
compilation, you need GCC > 9.2.
$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt update
$ sudo apt install gcc-9 g++-9 libstdc++6