yhwang / node-red-contrib-tf-model

A Node-RED node to load tensorflow model
Apache License 2.0
21 stars 22 forks source link

Automate hardware detection during install #7

Open dceejay opened 4 years ago

dceejay commented 4 years ago

Would it be possible to use a pre-install script to automatically detect the hardware it is being installed on and then create a custom-binary.json file and then run the npm install .... at least for a few of the commonly known hardware platforms like Rapsberry Pi and Jetson Nano as you have already listed ?

yhwang commented 4 years ago

@dceejay the auto detection mechanism you mentioned is good and I discussed this with tfjs team earlier. However, they tended to support major platforms in the original npm package. We will try to discuss with them and see if we can have a better solution for more platforms/architectures.

The other workaround is to provide a tfjs-node installer utility. It can handle the platform detection and integrate some platforms that open source community supports.

dceejay commented 4 years ago

well - as long as that utility is itself an npm package. The point being we want to be able to require tfjs as part of other packages, and for it to get installed correctly across as many platforms as possible without having to intervene manually. (especially as currently the install seems to work - and it's only at runtime that the errors occur)

As far as I can ascertain 1.4 used to install ok on Pi, so from that point of view 1.5 onwards was a breaking change :-) Certainly there are a lot of folk out there experimenting with Pi and Jetson for small local home security apps and the like, and if it helps get them on the tfjs bandwagon that has to be good.