Build an ML framework for Arm
The framework you choose may depend on the application you wish to run. This example uses Baidu's DeepSpeech 2, a state-of-the-art speech recognition system that provides very high-quality models for both English and Chinese.
The instructions provided here work on Ubuntu 16.04 LTS running on a packet.net type 2A server. For reference, the official guide for building PaddlePaddle from source is here: https://github.com/PaddlePaddle/DeepSpeech.
Most dependencies are already pre-built for Armv8. Logged in to the server, enter the following to a command line to obtain and install the dependencies from standard repositories:
apt-get -y install python-dev python-pip python-numpy python-scipy python-wheel git cmake swig golang libfreetype6-dev libpng12-dev libopenblas-dev
pip install protobuf
git clone https://github.com/PaddlePaddle/recordio.git
pip install -e .
Building from source can take several hours. Once complete, you can copy the *.whl file and deploy it directly onto subsequent servers. To build from source:
git clone https://github.com/PaddlePaddle/Paddle.git
cmake -DWITH_GPU=OFF -DWITH_TESTING=OFF ..
Installing the built package is straightforward.
- Display the contents of the python/dist directory by entering the ls command. Note the version number in the name of the .whl file.
- Enter this command and add the version number that you noted in step 1:
pip install Paddle/build/python/dist/paddlepaddle*.whl