-
Notifications
You must be signed in to change notification settings - Fork 73
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
Docker, requirements and amhf support #216
Docker, requirements and amhf support #216
Conversation
@davidusb-geek , will see how the test builds react to the change, |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #216 +/- ##
==========================================
- Coverage 87.63% 87.54% -0.10%
==========================================
Files 6 6
Lines 1707 1710 +3
==========================================
+ Hits 1496 1497 +1
- Misses 211 213 +2 ☔ View full report in Codecov by Sentry. |
The current docker has been set up to use web_server requirements if standalone mode only. Is this right? Never actually thought about it before now. |
I'll think move the web_server requirements to be used on all modes makes more sense ? Or am I thinking in reverse and the web_server packages are only needed for the addon? @davidusb-geek |
If it those three packages are required for all modes, could both requirments.txt and requirements_webserver be merged like on EMHASS-add-on? |
Yes probably the best solution. |
Sill testing. Just takes a while with pip. |
Unfortunately I don't believe I can finish testing this until tomorrow. Sorry about that. |
This is just a test. Will continue this further possibly tomorrow. (if build works, feel free to test and pull). Otherwise test when I'm next available. Requirement change: |
No don't worry no rush. |
At some point in the past I was able to solve a lot of problems for arm arch by using this type of command to install packages:
|
@GeoDerp could you help us understand where the persistent files are stored now. They are now inside the running docker for the add-on? Before they were saved in the share folder on HA |
The persistent data for a addon is in the And the options.json is also there automatically. Hopefully that helps. The rest is being stored in Do note that I believe /data is private to only the addon. The benefit is that uninstalling / updating / reinstalling the addon should manage the files correctly (would need to check to confirm). The downside you may not be able to access these files remotely. You may wish to set this line back to /share if this isn't your desired result. |
No this seems nice. At some point we were having issues with data persistance after reboot and add-on update. So we implemented this manual data saving on the share folder. But if your implementation works fine which seems to be the case for now is good for me. That time was just my lack of skills on docker that made me use the manual approach. But I like this implementation more. We can still access the files if needed by going inside the container. |
@davidusb-geek , this is still in testing. Just presenting progress. One of the issues with numpy & scipy is their requirements with Blas/OpenBLAS. For some reason (32bit) armhf doesn't have that package. Therefore we are building this manually for that architecture. There is a option to disable the use of blas for both. However I'm unsure if EMHASS uses this package. So I'm assuming it does. I have also bumped the versions these 2 packages for testing purposes. I assume this could be bumped down and still work however. Will need to test functionality either way (if the build works). |
This may still be the way to go. When testing I found this method to be slow (if not failing to pull). So I removed it for testing, |
There is also an argument for how many users are still using 32bit versions on their Raspberry pi. A lot of these errors could be simply fixed by removing Its to my understanding this will stop support for pi1,2,3(32bit). So I understand If this architecture wants to be kept. The argument will be against how well EMHASS will run on a pi zero, 1,2,3 , and is it worth keeping support for the time being. Happy to work around whatever. |
Yes I understand the argument. It there is no simple solution we will have no other choice than drop support for armhf. |
@davidusb-geek , realized why I was so confused. the armhf image of Currently testing this and a version with |
Last commit, found that setting It looks like all architectures work now. both arm builds take only 10m now also. (I think that's thanks to the new numpy/scipy versions) |
Great! Nice finding of that solution |
Just doing final testing now and ill do the last commit. (ill do a pr for EMHASS-Add-on also) |
fyi, still testing on: https://github.com/GeoDerp/emhass Edit: added raspbian, seems to work well so far with native armhf support. |
- added Raspbian - Dev Container actions better match Docker's EMHASS install and run - added --no-deps and --force-reinstall to emhass pip
armhf seems to run without any faults. Will do a more thorough test tomorrow. |
Testing process:
+Standalone inc. all lp_solver, with patch for pulp cbc +Add-On
+Standalone +Add-On
+Standalone +Add-On inc. weather_forecast_method and lp_solver (separately)
+Standalone inc. weather_forecast_method +Add-On inc. lp_solver Testing Info
I may not test arm/v7, we will see. When these are all ticked fill free to merge this PR. |
Ill see if I can test the other two tomorrow. @davidusb-geek if you have a good MPC example that could work for testing send it my way and ill use it to test MPC also. Something like this? curl -i -H 'Content-Type:application/json' -X POST -d '{"pv_power_forecast":[0, 70, 141.22, 246.18, 513.5, 753.27, 1049.89, 1797.93, 1697.3, 3078.93], "prediction_horizon":10, "soc_init":0.5,"soc_final":0.6}' http://localhost:5000/action/naive-mpc-optim Let me know if there is anything else you will like me to test with above. |
This example test is good enough for me for MPC. |
Was unable to work on this today. Will try and get it done for the time you usually merge on the weekend. |
Yes exactly, I will be able to take a more in depth look at all this this weekend. Thanks for these efforts! |
All goes well the test will be done tomorrow. Otherwise the day after (Aus time). 👍 |
@davidusb-geek , im probably pretty happy with these changes. Ill see If I can test the other two by the time you test your self. |
So the color-code table is updated? |
im looking into virtualization of aarch64 and arm/v7 now. |
@davidusb-geek , feel free to start testing this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some typos on develop.md but I will fix them on my side.
No description provided.