Getting Started with pyAerial

Aerial CUDA-Accelerated RAN 24-2 Download PDF

Running pyAerial requires its own container, which also contains machine learning tools commonly used together with pyAerial:

To create and launch the pyAerial container, the following are needed:

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 (note that you can omit the first command if the container is already running):

Copy
Copied!
            

docker run --rm -d --name cuBB <container image file> docker cp cuBB:/opt/nvidia/cuBB cuBB docker stop cuBB cd cuBB

The HPC Container Maker can be installed as follows:

Copy
Copied!
            

pip install hpccm

Once the above pre-requisites are fulfilled, the pyAerial container is built using the following script:

Copy
Copied!
            

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:

Copy
Copied!
            

$cuBB_SDK/pyaerial/container/run.sh

pyAerial is pre-installed within the pyAerial container. However, it can also be built and installed as follows (these commands are issued inside the pyAerial container):

Copy
Copied!
            

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

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:

Copy
Copied!
            

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:

Copy
Copied!
            

$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):

Copy
Copied!
            

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:

Copy
Copied!
            

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.

Previous Overview
Next Examples of Using pyAerial
© Copyright 2024, NVIDIA. Last updated on Jul 15, 2024.