Getting Started with pyAerial
Running pyAerial requires its own container, which also contains machine learning tools commonly used together with pyAerial:
NVIDIA Sionna (version 0.19.0)
NVIDIA TensorRT (version 10.6.0)
TensorFlow (version 2.15.1)
To create and launch the pyAerial container, the following are needed:
NVIDIA Aerial CUDA-Accelerated RAN container, see instructions here.
HPC Container Maker (HPCCM) installation
The source code needs to be copied from the NVIDIA Aerial CUDA-Accelerated RAN container to a
directory outside the container. The source code can be copied into the cuBB
directory
as follows (for example, see the note below):
docker run --rm -d --name cuBB <container image file>
docker cp cuBB:/opt/nvidia/cuBB cuBB
docker stop cuBB
cd cuBB
The first command above can be omitted if the container is already running. Similarly, the stop command can be omitted if one wishes to keep the cuBB container running. The above example is showing one way of copying the source code from within the container into a directory outside the container.
The HPC Container Maker can be installed as follows:
pip install hpccm
Once the above pre-requisites are fulfilled, the pyAerial container is built using the following script:
export cuBB_SDK=`pwd`
AERIAL_BASE_IMAGE=<container image file> $cuBB_SDK/pyaerial/container/build.sh
The container can then be launched using the following script:
$cuBB_SDK/pyaerial/container/run.sh
Once the container is running, pyAerial can be built and installed as follows (these commands are issued inside the pyAerial container):
cd $cuBB_SDK
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cuPHY/cmake/toolchains/native -DNVIPC_FMTLOG_ENABLE=OFF
cmake --build build -t _pycuphy pycuphycpp
./pyaerial/scripts/install_dev_pkg.sh
Note that pyAerial, similarly to Aerial cuPHY, is by default built for GPUs with compute capabilities 8.0 or 9.0, and these are also what pyAerial has been tested against. There is no guarantee that pyAerial will work correctly with other GPUs. However, pyAerial can be built for other compute capabilities with an additional cmake option, for example for CC 8.9:
cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cuPHY/cmake/toolchains/native -DNVIPC_FMTLOG_ENABLE=OFF -DCMAKE_CUDA_ARCHITECTURES="89"
To test that the installation works, the example Jupyter notebooks can be run as described below. Alternatively, the unit tests can be run as follows:
$cuBB_SDK/pyaerial/scripts/run_unit_tests.sh
Note : Unit tests are based on Aerial CUDA-Accelerated RAN test vectors. Those need to be mounted within
the pyAerial container, and environment variable TEST_VECTOR_DIR
set to point to the
test vector directory. Refer to the Aerial CUDA-Accelerated RAN documentation on how to generate the
test vectors.
One simple way to test the installation is to run (within the pyAerial container):
python3 -c "import aerial"
which should pass without errors.
NVIDIA pyAerial contains a number of example notebooks in Jupyter notebook format. The Jupyter notebooks can be run interactively within the pyAerial container using JupyterLab. This is done by starting a JupyterLab server as follows:
cd $cuBB_SDK/pyaerial/notebooks
jupyter lab --ip=0.0.0.0
and then pointing the browser to the given address. Note that the Aerial Data Lake notebooks require require the example database to be created first. Refer to Aerial 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.