Getting Started with pyAerial#

Pre-requisites#

pyAerial runs inside the standard Aerial container. The following are needed:

  • NVIDIA Aerial CUDA-Accelerated RAN container, see instructions here.

  • Docker installation, see instructions here.

Launch the Aerial container:

$ ./cuPHY-CP/container/run_aerial.sh

Installing pyAerial#

Python dependencies are managed in an isolated virtual environment at pyaerial/.venv, created by CMake.

For x86:

$ cd $cuBB_SDK
$ cmake --preset pyaerial-x86
$ cmake --build --preset pyaerial-x86 --target pyaerial_setup
$ source pyaerial/.venv/bin/activate

For aarch64:

$ cd $cuBB_SDK
$ cmake --preset pyaerial-arm
$ cmake --build --preset pyaerial-arm --target pyaerial_setup
$ source pyaerial/.venv/bin/activate

The shell prompt will show (pyaerial) once the virtual environment is active.

Note

pyAerial, similarly to Aerial cuPHY, is by default built for GPUs with compute capabilities 8.0 and 9.0, and these are also what pyAerial has been tested against. There is no guarantee that pyAerial will work correctly with other GPUs. To target a different compute capability, pass -DCMAKE_CUDA_ARCHITECTURES after the preset, for example for CC 8.9:

$ cmake --preset pyaerial-x86 -DCMAKE_CUDA_ARCHITECTURES="89"

Testing the installation#

One simple way to verify the installation is to run:

$ python3 -c "import aerial"

which should pass without errors.

To run the full unit test suite:

$ cmake --build --preset pyaerial-x86 --target pyaerial_test

Or, to run both lint checks and unit tests in a single step:

$ cmake --build --preset pyaerial-x86 --target pyaerial_all

Note

Unit tests require Aerial CUDA-Accelerated RAN test vectors. By default these are expected under /mnt/cicd_tvs/develop/GPU_test_input/. Set the environment variable TEST_VECTOR_DIR before configuring CMake to point to a different location. Refer to the Aerial CUDA-Accelerated RAN documentation for instructions on generating the test vectors.

Running the example Jupyter notebooks#

NVIDIA pyAerial contains a number of example notebooks in Jupyter notebook format. The Jupyter notebooks can be run interactively using JupyterLab. Activate the virtual environment and start a JupyterLab server as follows:

$ source $cuBB_SDK/pyaerial/.venv/bin/activate
$ cd $cuBB_SDK/pyaerial/notebooks
$ jupyter lab --ip=0.0.0.0

Then point a browser to the address shown in the terminal output. Note that the Data Lake notebooks require the example database to be created first. Refer to the Data Lake documentation on how to start the clickhouse server and create the example database.

Pre-executed versions of the notebooks are found here: Examples of Using pyAerial.