Last active
November 19, 2023 09:23
-
-
Save Namburger/82e86f2d3514288aa46c9183fc53c809 to your computer and use it in GitHub Desktop.
installing libbrosa on the Coral Dev Board
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I got librosa working on the Dev Board running Mendel Day (4.0). | |
Some steps may not be necessary at later OS release. | |
1) Preparations: | |
The Dev Board may not have enough storage, so I suggest first to add an sdcard (I have a 16GB card), than mount it: | |
mkdir /home/mendel/sdcard | |
sudo mount /dev/mmcblk1p1 /home/mendel/sdcard | |
With extra storage now, we can add some swap which may be necessary for the build: | |
sudo fallocate -l 2G /swapfile | |
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2097152 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
Install some dependencies: | |
sudo apt-get install libssl-dev | |
sudo apt install python3-dev | |
sudo apt install git | |
pip3 install Cython --user | |
Install cmake: | |
wget https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0.tar.gz | |
tar xvf cmake-3.17.0.tar.gz | |
rm cmake-3.17.0.tar.gz | |
cd cmake-3.17.0/ | |
./configure | |
make | |
sudo make install | |
2) Build some dependencies: | |
librosa depends on libllvmlite and an updated version of tbb, so we'll need to tackle those first: | |
Unfortunately, none of these libraries really has prebuilt packages for aarch64 or for some reasons | |
I just couldn't get it to install, so I had to build everything from scratch! | |
Build & install TBB: | |
sudo apt install libffi-dev | |
git clone https://github.com/wjakob/tbb.git | |
mkdir build && cd build | |
cmake .. | |
make | |
sudo make install | |
Build & install llvmlite | |
sudo apt install libllvm7:arm64 llvm llvm-7 llvm-7-dev llvm-7-runtime llvm-runtime python3-llvmlite | |
git clone https://github.com/numba/llvmlite.git | |
export LLVM_CONFIG=/usr/lib/llvm-7/bin/llvm-config | |
python3 setup.py build | |
3) Finally build and install librosa: | |
wget https://github.com/librosa/librosa/archive/0.7.2.tar.gz | |
tar -xvf 0.7.2.tar.gz librosa-0.7.2/ | |
cd librosa-0.7.2/ | |
python3 setup.py install | |
Huge thanks to llvm and librosa team for the help: | |
https://github.com/librosa/librosa/issues/1116 | |
https://github.com/numba/llvmlite/issues/588 |
does coral board support whisper and torch i am getting error while installing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently working instructions from a fresh Mendel Eagle 5.3 image:
There's been some significant aarch64 support added since you've made your instructions! Thanks for being a pioneer.