-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Getting RASA to Work on the Raspberry Pi 4 (Buster) #4603
Comments
Hi @TheCedarPrince , thanks for your detailed description. However, I'm afraid we can't really do anything to help you with this problem. I know that @JulianGerhard21 managed to run it on a Raspberry PI, maybe he can help us out? |
Hi, indeed Rasa works properly on my Raspi 3 and 4 (Debian 9 and 10). However, I have not updated to 1.3.9 - I will do that tomorrow and give you some Feedback on it. Sorry that I cant tell you more maybe I can tomorrow. Regards |
Hi @sara-tagger, @wochinge, and @JulianGerhard21. First off, thanks all for the assistance and thoughts! @wochinge, I am glad you found the bug sufficiently documented - I'll keep it in that format for the future if I find more bugs! @JulianGerhard21, interesting! I had no problem installing TF actually through a normal pip installation. It was just the or-tools that was giving me issues. If you can provide me the steps you took, I could try to replicate them on my end and do a write-up for your guys' wiki on how to install rasa on the Raspberry Pi 4. I can confirm that I was able to install and successfully run rasa-nlu on the Pi via the following steps:
Here is an example of what it looked like when I got everything running successfully: But definitely agree, compatability is a mess; this was why I was trying to build it inside a conda environment (still seeing if that is a possibility as the architecture of conda may not allow us to sufficiently run rasa from a conda environment). |
Hi @TheCedarPrince , I updated Rasa on my Raspi 4 with Debian 10 to version 1.3.9 "including" ortools. To achieve that, follow these steps:
I think the more heavy thing is to install Spacy on the Pi :-) I hope that helped! Regards |
Hey @JulianGerhard21, Thanks for the help! I shall attempt this sometime soon so - then, per your input, we can close the issue provided I can replicate everything. Which I think I will be able to! With regards to spacy, I actually determined an easier way of doing that by using these steps:
Using the python3-dev and python3-pip dependencies, it finds the latest Tensorflow ARM compatible Python wheel. |
@JulianGerhard21 Thanks for your fast and competent help! I have seen the question regarding running |
Hi @wochinge , of course, I would be happy to do that. I am not quite sure if you are in the [email protected] dispatcher but Emma already asked the same about my SmartSpeaker project on the Raspi. Is there any template for a tutorial / blog entry that I should respect? I should add that I won't be able to start this week but next week - is that okay? Regards |
Hey @JulianGerhard21, I can partially confirm your solution that you offered earlier. Following your instructions for installing mesh, I am now past the or-tools issue! 🎉 🎉 🎉 However, I am still having issues with spaCy. As it would turn out, I was installing a very old version of spaCy onto my Raspberry Pi 4 using I attempted the instructions you left on installing spaCy and was not able to replicate your solution for installing spaCy; could you enumerate the steps you took and how you accomplished this? I tested installing the package with Python 3.5 and 3.7 as well as inside of package management environments (i.e. conda and venv). What I continue to get stuck on specifically is installing the blis package for spaCy - I tried out the instructions you suggested from here (see reference below) but no luck. I felt the instructions given in the issue you referenced were too vague for me to understand... Here was the procedure I followed:
However, I continue getting stuck at installing Thanks for the assistance @JulianGerhard21! |
Hi @TheCedarPrince , thanks for your feedback. Unfortunately I am a bit busy today. I have cloned my SDCard and tomorrow I am going to reinstall Rasa 1.3.9 alongside with tensorflow 1.14.0 and Spacy with its newest version and document the whole process. A keypoint is the fact that the most compatible python version at the moment is 3.6.8 which is not installed per default on Debian 10. After reinstalling that, several other issues did not happen again. I am going to give you the documentation and feedback, but please dont expect until tomorrow evening. I want to make sure that it's done properly. Another thing: removing a dependency from a library is not a neat solution so I'd suggest to rename the issue again: "Issues while installing Rasa on a Raspberry Pi4". This would lead more users with partially different/same problems to the issue. @wochinge I am getting back to you as soon as I have verified, that everything works properly. Maybe you can release the documentation on the docs then until the tutorial is finished. I think a tutorial is more or less a clean guide for different experienced users whereas the docs might address technical facts directly. What do you guys think? Regards |
Good question 😄I saw your video of the smart speaker project because it was shared internally and that was so cool!
I sent Emma a link to our conversation here, so she can get in touch with you. Not sure, how much sense it makes to combine both blog posts, I guess this would be up to you. Also, there is no template you have to respect.
Sorry, I didn't mean to rush you. Just the fact that you consider doing that at all is so great!
Pulling in @akelad for that one. Do you want to put that on the docs? |
@JulianGerhard21 - oh! I'll test things out with Python3.6. Oh no rush at all! I just appreciate the help so far. I agree with you on renaming the issue but I feel the name may be somewhat vague and may attract off-base requests. Since we already solved the or-tools problem, perhaps we could close this issue and open a more general post on the forum? What do you think @JulianGerhard21 and @wochinge? Also, if you are strapped for time @JulianGerhard21, I could potentially help with the tutorial/docs you want to put together - I have been cataloging my progress anyhow and I could port it over to a tutorial somewhat quickly. |
Hi guys, this is one adventure.... I am nearly finished with a stable Installation guide. Last step is to compile python 3.6.8 with bz2 Support. Some of the major problems are the dependencies of tensor2tensor which mostly are not arm7 compatible per default and the fact that tensorflow currently has problems with python 3.7.x. The good news: I managed to install tensorflow, rasa and spacy All with their latest versions (tf 1.14. And 2) without errors by following my documentation. However, rasa uses bzip2 to handle some file IO operations and I used a python version without it. I am going to confirm everything asap and provide the tutorial. We can then discuss how to publish it @wochinge @TheCedarPrince Regards |
Hi guys, (@wochinge @TheCedarPrince @akelad) I was now able to set everything up properly. I had the following setup, but tried to make everything as flexible as possible so at least Raspian 9 should be supported aswell: Device: Raspberry Pi 4 The following steps are necessary or recommended:
2.1 Install the bzip2 development library with
To confirm that your installation works, you can do:
There should not occur problems until this point. Now things are getting a bit more complicated since we are entering areas where compatibility is not given and we need to build/modify things. First of all we need to clone certain repositories (clone in separate directories is recommended): a.
At this time, we have successfully installed Tensorflow, SpaCy and several dependencies that are getting important now.
Now you should be able to run: General notes: The main problems are missing wheels for Raspbian/Debian 10, compatibility issues with various python versions and the fact, that arm7 is not the widest supported architecture. However, the performance is really good in terms of training/usage time.
Of course this guide may not work for your specific scenario. If there are questions, feel free to ask. |
This is a fantastic write-up @JulianGerhard21 ! I will work on this over the next couple days to see if I can replicate things (am a bit busy right now but should have time to get things all set by Wednesday). Much thanks to you (and your wife!) for all the hard work; in short: When I get time, I will let you know how things go! One small note that is fantastic - I originally used Python 3.5 to avoid the OpenCV issue. You were able to work around it in Python3.6 which is awesome. The more recent the version, the better in my opinion! |
Hi @TheCedarPrince, thanks for your kind words. With every iteration we can make the guide more stable! Most likely you will have questions! :) Let me know whenever I can be of help! Regards |
Ok, here is where I got to for tonight @JulianGerhard21, I am currently stuck on Step 3. In Step 2 I was not able to run the command
I proceeded on and instead used Once I got to Step 3, I ran the command
Any thoughts about what you think is going on? This was after a clean install of Raspbian (Buster) Lite after having only ran the commands:
|
Hi @TheCedarPrince , please do:
and then repeat step 2.3 and Regards |
@JulianGerhard21 - that worked! I would suggest editing the guide on Step 2 to this: 2. Install the system dependencies with Also, I like to keep my installs as light as possible and was curious, do we need all the other system dependencies aside from libbz2-dev and libssl-dev? Or can we get away with simply, Finally, in step 3 I do get an error if I run the pip install without the --user flag. I would suggest editing the guide on Step 3 to this: 3. Update pip and setuptools with Will test out the rest of the steps later and keep you up to date. Yours, |
Hi @TheCedarPrince ,
this depends mainly on what you want to be able to do later - because of that it was not part of the guide. I myself need most of those packages, but you are right: the minimal requirement are those two. I changed the guide accordingly.
Jeah - this might be a bit annoying but I think to keep things clean, it makes sense. I changed the guide accordingly. Regards |
Hey @JulianGerhard21, Doing a small update/check-in right now that I want your opinion on. I will provide more info later but am running into an error on Step 16. Once I follow your instructions up to that point, I am still getting errors about the program shouting about I removed opencv from the setup.py file in tensor2tensor; when that didn't work, I also tried removing dopamine-rl from the file. No luck either way. Here is the traceback I am getting with only opencv removed from the file.
Here is also the output of my pip list (I do have OpenCV installed and can successfully import it - just don't know why cv2 is not popping up in my pip list):
Any thoughts on what is going on? I may try a fresh install to see if that works. If you need more information, let me know. Yours, |
Hi @TheCedarPrince, are you sure that you haven't accidently skipped this part:
I'd suggest to repeat those steps first: Keep the following in mind: Regarding cv2: As I mentioned, there is no information-deployment in the site-packages (where pip show reads from) for cv2 because this step is missing in the OpenCV guide. It is something on my agenda that I have to experiment on - should not be that hard. I hope it works now! Regards |
Hey @JulianGerhard21, I am so so close! I can boot up RASA, it pops me into the prompt, and when it starts to do its magic, it fails with the following traceback:
I am definitely executing through Steps 10 - 12 to install
And here is the following traceback I am getting from that:
Also, here is the traceback for when I run the command for
We are almost there I think! Any thoughts as to what you think is happening? EDIT: Wait, I might have found the mistake. Hang on. Yours, |
Ok, I tried tracking down my bug but still could not find it. Any thoughts? Yours, |
Hi @TheCedarPrince, ok - let's try something: Do a The error shown by rasa is "only" a consecutive error produced by the broken tensor2tensor libraby. Did that work? Regards |
I tried it again and still no luck; here is the return on
And here is the output from when I execute
I have a theory that I am going to try based on the output from the Will post results back later. Let me know if you have any other theories. But you never had a problem with Yours, TheCedarPrince |
Hi @TheCedarPrince, hm - strange. I never had this problem. However we are going to solve it. Try your idea and give feedback - thats good. Another idea would be: Remove Regards |
VICTORY!!! 🎉 🎉 🎉Julian. Julian. JULIAN!!!! WE DID IT!!! @JulianGerhard21 !!! THIS IS HUGE!!! All I did was the following:
And now the bot WORKS!!! I haven't tested out all the functionality to see if everything is working completely, but it finished training on the RPi completely using spaCy and all the other packages. Creating Your Own RasaPi - Instructions@JulianGerhard21 and all others interested in getting RASA on an RPi4, I meticulously created a script that will automatically install everything needed onto your Pi based on the aforementioned exchange:
THANK YOU!I would certainly like to thank @JulianGerhard21 for all the fantastic assistance, input, and massively heavy lifting. Without Julian's input, none of this would be possible. I have had a wonderful time working together here and learned a lot from you and this process - a "thank you" cannot do you enough justice but... THANK YOU I would also like to thank @jrosebr for his awesome instructions that I adapted here for installing OpenCV. Finally, a huge thank you to the RASA team! Thank you for making this wonderful product and I am excited to see how we can all use it on resource-constrained devices! And with that, I shall now, close the issue. Issue: RESOLVED! EDIT 10/24/19: Fixed a path error. |
So, what now @JulianGerhard21 , @wochinge , @akelad ? I was thinking @wochinge and @akelad , perhaps the RASA team could make a separate, community-supported repo for the Raspberry Pi now that things are working? I could imagine things will become incompatible in the future and it would be a shame to see this support fall away as I think this opens RASA to a whole new community of makers, researchers, etc. Perhaps we could start the Repo with the aforementioned script that was adapted from @JulianGerhard21 's guide and tweaked by me? Maybe you guys could also host a Pi image with RASA set up on it that we could download from the RASA site? What do you think @JulianGerhard21 ? Yours, TheCedarPrince |
Hi @TheCedarPrince , glad it worked - thanks for the kind words and thanks for the script - good idea - that makes life much easier. I am up to everything that makes sense. I confirm that there definitely will be incompatibilites in the future and we need to keep track of them. A feature-branch or own repo needs to be updated/maintained and I am not quite sure if the Rasa team wants to provide that - but of course I would be in. I think @wochinge and @akelad need to decide how to proceed. I think a tutorial on their blog would be a good start. In addition we could determine if your other suggestions make sense! However, I am in - of course! :-) Regards |
@JulianGerhard21 @TheCedarPrince awesome that you got it working! it's really great to see the community working together like this :) |
Hey @wochinge , @akelad , @JulianGerhard21 , I am reopening this issue as I want to see if the script Julian and I wrote can be independently verified. To test it, here is what you do:
This process will take upwards of 3 hours so don't worry if it is taking longer than expected. Thanks for the help and looking forward to making sure this script is good to go! TheCedarPrince |
Hi @TheCedarPrince , @JulianGerhard21 , our team discussed how we can best add this to Rasa, and we think it would be best if you would set up a separate repository which includes the script and maybe some tests which verify that new releases didn't break things. If you need any help in setting this up, we are happy to support you there. We can then link to it from the docs so that it's visible to the community. How does that sound?
I'm currently trying to find out whether anyone in our engineering part owns a raspberry PI. However, you could also share it in our forum and get some feedback from the community? https://forum.rasa.com/c/rasa/tutorials would be a good place for that 🤔 |
Hey @wochinge - that sounds good. Unfortunately, I am going to have to say no about creating the separate repository right now as I do not have the bandwidth to take it on. @JulianGerhard21 - do you? The forum is a good idea! I will pop over soon and make a post. 😄 Yours, |
Sorry for the late reply. I had some private incidents pro manage. I think this is a good idea/approach and I would be willing to work on this. However this cant be done in a few days IMHO so I need some time to think about the things to prepare. I would come back to you with feedback asap! Thanks for the support! Regards |
Hey @wochinge and @JulianGerhard21, I added the news to the Rasa Forum and am now waiting to hear from the community about the script. Sounds good @JulianGerhard21 - hope all is well! Chat later. Yours, |
@JulianGerhard21 Sure, take all the time you need! @TheCedarPrince Thanks for creating the post! |
@TheCedarPrince thanks for this script. I'd really like to get Rasa working on the Pi. The
|
Hey @rgstephens If it is there, could you try removing dopamine-rl from the setup.py for tensor2tensor as well? Let me know if that works. Also, I am closing this issue and encourage everyone who has a question to see this forum and post your questions here. Thank you! |
Hi, I got this problem with the install.sh:
|
How can i share you my log.txt file ? |
I am also facing same issue |
Hi all, I will be able to provide feedback this thursday afternoon with Rasa 1.8. Ill post the details here asap. Regards |
Hi, With the last rasa version (1.8.0), i got this on my Raspberry 4 4GB with Ubuntu server 64 bits 18.04:
|
In case anybody is following the guide and running into the error: This is due to tensorflow-addons being added in later versions of tensorflow after the release of the guide. |
There's also a recent forum post with a Docker image for Raspberry Pi here |
Rasa version: 1.3.8
Rasa X version: N/A
Python version: 3.5
Operating system (windows, osx, ...): Raspbian Buster
Issue:
I am in the process of trying to install Rasa on my Raspberry Pi 4 (4GB RAM edition) and I continue running into an error with installing or-tools stating:
Any suggestions on any potential work-arounds?
Here is what I tried so far:
Another thought was to build a wheel for or-tools that could be compatible with arm7l architecture, but I do not know how feasible this is - it could be bundled with future releases of rasa.
Replication of Error Procedure
Here are the steps I took to get to this point; follow it completely to replicate my error:
Freshly install a new version of Raspbian Lite (Buster) on an SD Card
Run the following to update the Raspberry Pi:
Install Berryconda package manager:
Add RPI channel into conda:
conda config --add channels rpi
Install Python3.5 into conda:
conda install python=3.5 -y
Set-Up conda environment (we set-up with 3.5 so as to not encounter an error with open-cv):
A. Create conda environment:
conda create --name alpha python=3.5 pip -y
B. Update all packages in conda environment:
Install rasa:
A. Install required system packages:
sudo apt-get install libatlas-base-dev python3-dev python3-pip libhdf5-dev -y
B. Reboot the computer
sudo reboot
C. Install rasa
source activate alpha && pip install rasa
Error (including full traceback):
Command which led to error:
pip install rasa
If you have any questions, feel free to reach out - I hope we can get this working!
The text was updated successfully, but these errors were encountered: