emlearn-micropython
emlearn-micropython copied to clipboard
More convenient install
Install currently have several steps
- Identify correctly which architecture the board has
- Download release archive from Github
- Unzip release archive
- Copy module files for correct architecture to device
While this is not particularly difficult, there is room for improvements.
The ideal solution would be to be able to run mpremote mip install emltrees, and that this would automatically handle each step. However, mip support for native module does not seem to be actively worked on.
A slight improvement would be if one could use mpremote cp to download directly from an URL.
mpremote cp https://github.io/emlearn/emlearn-micropython/releases/$version/$arch/emltrees.py :
This would also be useful for model files (.csv), and similar cases that need some data into the device.
This could be done by implementing HTTP(S) support in fs_put of https://github.com/micropython/micropython/blob/master/tools/mpremote/mpremote/transport_serial.py
We would also need to publish built files to a web server. For example using Github Actions to push to Github Pages.
MR with support for HTTP download for mpremote is now here, https://github.com/micropython/micropython/pull/13292
We are now pushing build binaries to Github pages. So documentation needs to be updated to reflect this
The .mpy modules can be installed from http with "mip install", both on PC (Unix port) and on device (using mpremote). The examples show this now.
But even better, the emlearn package and the examples can now be installed with a one-click workflow using Viper IDE. Thanks to @vshymanskyy !!
Here is an example:
The complete examples all have such options now. So installation is now as convenient as it can possibly be!