Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspberrypi.sh does not install nn~ correctly #63

Open
xingjeffrey opened this issue Nov 1, 2023 · 8 comments
Open

raspberrypi.sh does not install nn~ correctly #63

xingjeffrey opened this issue Nov 1, 2023 · 8 comments

Comments

@xingjeffrey
Copy link

I am trying to install nn~ for a Raspberry 4B with the raspberrypi.sh script

curl -s https://raw.githubusercontent.com/acids-ircam/nn_tilde/master/install/raspberrypi.sh | bash

However, the pd external nn~.pd_linux is not generated by the script, resulting in the following error:

installing compilation tools... installing libtorch... configuring nn~... compiling nn~... installing nn~... **cp: cannot stat 'frontend/puredata/nn_tilde/nn~.pd_linux': No such file or directory** installed nn~ to /usr/local/lib/pd-externals/ ! have fun !
I try to run the script line by line, and it seems to be something wrong with the cmake where it is not generated the nn~.pd_linux file where it is supposed to be. Instead the only files in frontend/puredata/nn_tilde/ are

CMakeFiles cmake_install.cmake Makefile

I am not sure what to do here since I don't know C. Any help will be appreciated!

@xingjeffrey
Copy link
Author

I played around some more and found that the problem for me is in the C++ version specified in the CMakeLists.txt of both the backend and frontend in /src. Changing CXX_STANDARD 14 to CXX_STANDARD 17 in both .txt solved all issues. I don't know if that screws up other installations, but this solves compiling issues for raspberrypi 4B and generates a nn~.pd_linux file as expected.

@maurice-jo
Copy link

I have the same issue. Changing the CCX_Standard versions does not help unfortunately. Any advice?

Working on Raspberry Pi 5.

@xingjeffrey
Copy link
Author

I have the same issue. Changing the CCX_Standard versions does not help unfortunately. Any advice?

Working on Raspberry Pi 5.

After I solved my installation issue and set up everything I realized that my 4B wasn’t powerful enough to decode fast enough for my purpose… and now I have resorted back to decoding on my Mac. I am not sure about 5, but if you can get away with decoding on a more powerful and stable machine, that would be my advice. If you have to do compact design (which was my original goal, I wanted to make a portable toy for myself), I hope others who have had success with raspberrypi decoding can help you more.

@danielmanz17
Copy link

Working on Raspberry Pi 5.

Hey Maurice, did you manage to get this working in the end? Also trying to get nn~ running on a raspberry pi 5.

@maurice-jo
Copy link

Hey Daniel! Yes, I managed to get it working with a clean install of Pi Os bookworm and the linux.sh in the install folder.

@danielmanz17
Copy link

danielmanz17 commented Sep 23, 2024

Great, was this without having to modify the CMakeLists.txt file? And did you also try with raspberry.sh (also in the install folder, is what I've been using unsuccessfuly)

@danielmanz17
Copy link

danielmanz17 commented Oct 7, 2024

Did you simply run the command curl -s https://raw.githubusercontent.com/acids-ircam/nn_tilde/master/install/linux.sh | bash in the raspberry pi 5 terminal? I am encountering the same errors quoted in this issue, despite changing CCX_STANDARD 14.

@moiseshorta
Copy link

moiseshorta commented Nov 5, 2024

For anybody still having problems installing, here's what worked for me:

### Instructions building nn~ for Pure Data on Bookworm OS (Raspberry Pi 5) 
### Last updated: November 5, 2024

# Allows you to install pip3 packages directly without warning (source: https://qengineering.eu/bookworm.html#VirtualEnv)
$ sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old

# install the dependencies
$ sudo apt-get install python3-pip libjpeg-dev libopenblas-dev libopenmpi-dev libomp-dev
$ pip3 install setuptools numpy Cython
$ pip3 install requests

# install PyTorch, Torchvision, Torchaudio
$ pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
$ pip3 install torchaudio --index-url https://download.pytorch.org/whl/cpu

# copy path of Pytorch installation
$ pip3 show torch

# Install and build nn~
$ cd Desktop
$ git clone https://github.com/acids-ircam/nn_tilde --recursive
$ cd nn_tilde
$ mkdir build
$ cd build

# Build nn tilde
$ cmake ../src/ -DCMAKE_PREFIX_PATH=/home/{user}/.local/lib/python3.11/site-packages/torch -DCMAKE_BUILD_TYPE=Release
$ make

# Copy nn~ external to puredata-externals folder
$ sudo cp '/home/{user}/Desktop/nn_tilde/build/frontend/puredata/nn_tilde/nn~.pd_linux' '/usr/local/lib/pd-externals'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants