This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:common:applications:armnn-tflite [2024/11/27 01:43] nick |
products:sbc:common:applications:armnn-tflite [2024/12/16 05:22] (current) sravan [Install necessary python packages] |
||
---|---|---|---|
Line 5: | Line 5: | ||
The Delegate is provided by ARM as [[gh> | The Delegate is provided by ARM as [[gh> | ||
+ | |||
<WRAP info> | <WRAP info> | ||
This library depends on OpenCL, make sure you are using the following platforms to ensure the driver is present. | This library depends on OpenCL, make sure you are using the following platforms to ensure the driver is present. | ||
- | ^ board ^ Linux Kernel (BSP) ^ OS ^ | + | ^ board ^ Linux Kernel (BSP) ^ OS ^ |
- | | VIM3 | 4.9 \\ 5.15 | Ubuntu 22.04| | + | | VIM3 |
- | | VIM3L | 4.9 \\ 5.15 | Ubuntu 22.04| | + | | VIM3L | 4.9 \\ 5.15 |
- | | VIM4| 5.4 \\ 5.15 | Ubuntu 22.04| | + | | VIM4 |
- | | Edge2| 5.10| Ubuntu 22.04| | + | | Edge2 | 5.10 \\ 6.1 | Ubuntu 22.04 \\ Ubuntu 24.04 |
You can refer to the [[products: | You can refer to the [[products: | ||
</ | </ | ||
+ | ===== Setup the environment ===== | ||
+ | ==== Install pip ==== | ||
+ | ```shell | ||
+ | $ sudo apt-get install python3-pip | ||
+ | ``` | ||
+ | <WRAP important> | ||
+ | Ubuntu 24.04 ships with the updated 3.12 version of python which Tensorflow has not been updated to the newer python version, hence we must use an older supported version. | ||
- | ===== Get source code ===== | + | Furthermore, |
- | Clone the examples [[gh> | + | as a result, python packages must be installed inside a python virtual environment to avoid conflicts. |
+ | You must activate this environment whenever you need to use the application. | ||
+ | |||
+ | Add the alternate python repository | ||
```shell | ```shell | ||
- | $ git clone https:// | + | $ sudo add-apt-repository ppa:deadsnakes/ppa |
- | $ cd armnn_tflite | + | $ sudo apt install python3.10 python3.10-venv |
``` | ``` | ||
- | ===== Setup the environment | + | Create a new virtual |
- | ==== Install pip ==== | + | |
```shell | ```shell | ||
- | $ sudo apt-get install | + | $ python3.10 -m venv work |
``` | ``` | ||
- | ==== Install necessary python packages ==== | + | Activate |
- | + | ```shell | |
- | <WRAP tip > | + | $ source work/ |
- | For Ubuntu 24.04 you need to use the python | + | ``` |
+ | Deactivate the virtual environment | ||
```shell | ```shell | ||
- | $ sudo apt update | + | $ deactivate |
- | $ sudo apt install python3.12-venv | + | |
- | $ python3 -m venv ~/myenv | + | |
- | $ source ~/ | + | |
``` | ``` | ||
+ | |||
</ | </ | ||
+ | ===== Get source code ===== | ||
+ | Clone the examples [[gh> | ||
```shell | ```shell | ||
- | $ pip3 install numpy pillow | + | $ git clone https:// |
+ | $ cd armnn_tflite | ||
``` | ``` | ||
- | ==== Install | + | ==== Install |
```shell | ```shell | ||
- | $ pip3 install | + | pip3 install |
``` | ``` | ||
==== Download ArmNN libraries ==== | ==== Download ArmNN libraries ==== | ||
```shell | ```shell | ||
- | $ wget -O ArmNN-aarch64.tgz https:// | + | $ wget -O ArmNN-aarch64.tgz https:// |
$ mkdir libs | $ mkdir libs | ||
$ tar -xvf ArmNN-aarch64.tgz -C libs | $ tar -xvf ArmNN-aarch64.tgz -C libs | ||
Line 73: | Line 85: | ||
==== Create library symlinks ==== | ==== Create library symlinks ==== | ||
```shell | ```shell | ||
- | $ sudo ln ../ | + | $ sudo ln ../libs/delegate/ |
- | $ sudo ln ../ | + | $ sudo ln ../ |
``` | ``` | ||