I’m need to use NumPy/SciPy in my project with hass.
What is the best way to best way to do it?
Since hass runs as docker container direct call to host OS functions is not possible (need some workaround I believe).
If I install NumPy as dewcribed by orenitamar (github) on Alpine:
Add py-numpy, since directly installing with pip doesn't work.
RUN apk add py-numpy
In the next step install it with pip.
RUN python -m pip install numpy
ENV PYTHONPATH=/usr/lib/python3.7/site-packages
will hass upgrade from web interface keep these changes, or it overwrites whole hass.io docker content?
Are you creating a HA integration? If so, all you should have to do is to list numpy in the manifest.json file as a requirement. E.g., see the manifest.json file for the trend binary sensor:
If anyone searches this topic, I got scipy working.
I installed scipy in docker via alpine package and symlinked the library to home assistant library.
Log in to docker:
docker exec -it homeassistant /bin/bash
In docker: