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