Anaconda on the AIR-T¶
Anaconda is a great virtual environment for developing Python applications and it is fully supported by the AIR-T and AirStack. This tutorial will show you how to create an AirStack Conda environment on the AIR-T. Note that GNU Radio is not yet available in this environment, but the SoapySDR radio drivers and GPU acceleration for signal processing and deep learning supported.
For AirStack 0.4.0+, Anaconda comes pre-installed with a built-in local conda channels for the AIR-T drivers. For older AirStack versions, see the Installing Anaconda on AIR-T Prior to AirStack 0.4.0 at the end of this article.
Create AirStack Conda Environment¶
We will now create a conda environment called
airstack using the
airstack.yml file provided by Deepwave. You may modify this to fit your application.
wget docs.deepwavedigital.com/Open_Source/files/airstack.yml conda env create -f airstack.yml
Testing a New Conda Environment¶
conda_test.py script to your AIR-T to test full operation.
conda activate airstack wget docs.deepwavedigital.com/Open_Source/files/conda_test.py python conda_test.py
Removing the Conda Environment¶
To remove the AirStack Conda environment, run the following command:
conda remove --name airstack --all
Installing Anaconda on AIR-T Prior to AirStack 0.4.0¶
Anaconda is pre-installed on AirStack v0.4.0+. If you are using an earlier version of AirStack, we recommend the
conda4aarch64 with instructions provided here. The instructions are reproduced below with some slight modifications.
1. Install Anaconda:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-aarch64.sh chmod +x Miniforge-pypy3-Linux-aarch64.sh ./Miniforge-pypy3-Linux-aarch64.sh
When prompted with the following question answer
Do you wish the installer to initialize Miniforge3? [yes|no]
2. (Optional) At this point, the conda
base environment will be activated whenever a terminal is opened. We recommend removing this behavior by executing the following:
$ conda config --set auto_activate_base false
Now the conda environment is only activated when you type
conda activate <env_name>.
3. Create a
airstack.yml file with the content below.
name: airstack channels: - conda-forge - nvidia - defaults - numba - c4aarch64 dependencies: - python=3.6 - scipy - numpy - matplotlib - ipython - pip
4. Open a terminal and create the new conda environment from the
conda env create -f airstack.yml
5. Install AirStack Drivers in Conda Environment by adding symbolic links to the AIR-T radio drivers from within a new conda environment. The radio will not work inside the environment unless these steps are followed, so you must do this for each new conda environment that you create. As a reminder, this is not necessary for AirStack 0.4.0+
Note: you must have your Conda environment activated before proceeding.
conda activate airstack wget docs.deepwavedigital.com/Open_Source/files/conda_post_install.sh bash conda_post_install.sh
conda_post_install.sh shell script will create the necessary symbolic links to bring the radio drivers into the AirStack environment.