ArmNN
 21.02
InstallationViaAptRepository.md
Go to the documentation of this file.
1 # How to install ArmNN via our APT repository on Ubuntu's Launchpad
2 
3 * [Introduction](#introduction)
4 * [Add the Ubuntu Launchpad PPA to your system](#add-the-ubuntu-launchpad-ppa-to-your-system)
5 * [Outline of available packages](#outline-of-available-packages)
6  + [x86_64](#x86-64)
7  + [arm64](#arm64)
8  + [armhf](#armhf)
9 * [Check latest version of packages](#check-latest-version-of-packages)
10 * [Install desired combination of packages](#install-desired-combination-of-packages)
11 * [Uninstall packages](#uninstall-packages)
12 
13 
14 ## Introduction
15 These are the step by step instructions on how to install the ArmNN core, TensorflowLite Parser as well as PyArmnn for x86_64, Arm64 and Armhf for Ubuntu 20.04.
16 The packages will also be added to Debian Bullseye, their progress can be tracked here: https://tracker.debian.org/pkg/armnn
17 
18 
19 ## Add the Ubuntu Launchpad PPA to your system
20 * Add the PPA to your sources using a command contained in software-properties-common package:
21  ```
22  sudo apt install software-properties-common
23  sudo add-apt-repository ppa:armnn/ppa
24  sudo apt update
25  ```
26 * More information about our PPA and the Ubuntu Launchpad service can be found at [launchpad.net](https://launchpad.net/~armnn/+archive/ubuntu/ppa)
27 ## Outline of available packages
28 
29 We provide a number of packages for each architecture; x86_64, aarch64 and armhf as outlined below.
30 
31 ARMNN_MAJOR_VERSION: This is the ABI version of the ArmNN source that has been packaged based on include/armnn/Version.hpp.
32 
33 ARMNN_RELEASE_VERSION: This is the marketing release version based on the date source was released on github e.g. 20.11.
34 
35 PACKAGE_VERSION: This is the version of the source package used to build the binaries packages from.
36 
37 ### x86_64
38 * Runtime Packages
39 ```
40 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
41 libarmnn-tfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
42 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
43 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
44 ```
45 * Development Packages
46 ```
47 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
48 libarmnn-tfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_amd64.deb
49 ```
50 ### arm64
51 * Runtime Packages
52 ```
53 libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
54 libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
55 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
56 libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
57 libarmnn-tfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
58 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
59 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
60 
61 ```
62 * Development Packages
63 ```
64 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
65 libarmnn-tfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_arm64.deb
66 
67 ```
68 ### armhf
69 * Runtime Packages
70 ```
71 libarmnn-aclcommon{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
72 libarmnn-cpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
73 libarmnn-cpuref-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
74 libarmnn-gpuacc-backend{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
75 libarmnn-tfliteparser{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
76 libarmnn{ARMNN_MAJOR_VERSION}_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
77 python3-pyarmnn_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
78 
79 ```
80 * Development Packages
81 ```
82 libarmnn-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
83 libarmnn-tfliteparser-dev_{ARMNN_RELEASE_VERSION}-{PACKAGE_VERSION}_armhf.deb
84 
85 ```
86 
87 ## Check latest version of packages
88 Due to Debian Packaging requiring the pristine tarball from our Github release, the version on Launchpad may not align with the released version on Github depending on the complexity of newly added features.
89 In order to check for the latest available ArmNN version use apt-cache search:
90 ```
91  apt-cache search libarmnn
92 
93  # This returns a list of matching packages, the latest being libarmnn23 i.e. ARMNN_MAJOR_VERSION=23
94  libarmnn-cpuref-backend22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
95  libarmnn-cpuref-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
96  libarmnn-dev - Arm NN is an inference engine for CPUs, GPUs and NPUs
97  libarmnn-tfliteparser-dev - Arm NN is an inference engine for CPUs, GPUs and NPUs
98  libarmnn-tfliteparser22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
99  libarmnn-tfliteparser23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
100  libarmnn22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
101  libarmnn23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
102  libarmnn-aclcommon22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
103  libarmnn-aclcommon23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
104  libarmnn-cpuacc-backend22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
105  libarmnn-cpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
106  libarmnn-gpuacc-backend22 - Arm NN is an inference engine for CPUs, GPUs and NPUs
107  libarmnn-gpuacc-backend23 - Arm NN is an inference engine for CPUs, GPUs and NPUs
108 
109 
110  # Export the ARMNN_MAJOR_VERSION to allow installation using the below examples
111  export ARMNN_MAJOR_VERSION=23
112 ```
113 
114 
115 ## Install desired combination of packages
116 The easiest way to install all of the available packages for your systems architecture is to run the command:
117 
118 ```
119  sudo apt-get install -y python3-pyarmnn libarmnn-cpuacc-backend${ARMNN_MAJOR_VERSION} libarmnn-gpuacc-backend${ARMNN_MAJOR_VERSION} libarmnn-cpuref-backend${ARMNN_MAJOR_VERSION}
120  # Verify installation via python:
121  python3 -c "import pyarmnn as ann;print(ann.GetVersion())"
122  # Returns '{ARMNN_MAJOR_VERSION}.0.0' e.g. 23.0.0
123 ```
124 This will install PyArmnn and the three backends for Neon, Compute Library and our Reference Backend.
125 It will also install their dependencies including the arm-compute-library package along with the Tensorflow Lite Parser and it's dependency ArmNN Core.
126 If the user does not wish to use PyArmnn they can go up a level of dependencies and instead just install the Tensorflow Lite Parser:
127 ```
128  sudo apt-get install -y libarmnn-tfliteparser${ARMNN_MAJOR_VERSION} libarmnn-gpuacc-backend${ARMNN_MAJOR_VERSION}
129 ```
130 
131 ## Uninstall packages
132 The easiest way to uninstall all of the previously installed packages is to run the command:
133 ```
134  sudo apt autoremove -y libarmnn${ARMNN_MAJOR_VERSION}
135 ```