hassio-addons / addon-appdaemon

AppDaemon4 - Home Assistant Community Add-ons
https://addons.community
MIT License
151 stars 47 forks source link

Stuck on Building wheel for numpy (version 0.9.0) #201

Closed huy-hng closed 2 years ago

huy-hng commented 2 years ago

Problem/Motivation

It seems like version 0.9.0 stops numpy from building. Maybe python3.10 compatibility problem? Appdaemon stops at Building wheel for numpy (pyproject.toml): started.

I've included the addon log below.

After a while there is something like a timeout error. I've only seen it once since (I think) the time window in order to see it is very narrow. I'm also not sure where to logfiles are stored so I cannot provide that at the moment. In case anyone knows where to find the log file containing the log below is stored, please let me know.

s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.9.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2022.6.6
 Home Assistant Supervisor: 2022.05.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/appdaemon.sh
Looking in links: https://wheels.home-assistant.io/alpine-3.14/aarch64/
Collecting numpy
  Downloading numpy-1.22.4.zip (11.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.5/11.5 MB 1.2 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: numpy
  Building wheel for numpy (pyproject.toml): started

Steps to reproduce

Having 0.9.0 installed and numpy as a dependency seems to suffice, I haven't tested other configurations.

Proposed changes

Reverting back to 0.8.2 fixes the issue again and numpy is able to build as usual.

frenck commented 2 years ago

If a numpy pre-build wheel is available, it can be faster during startup; when it's not, it can take a long time to build. I don't see an error or issues at this point?

huy-hng commented 2 years ago

Absolutely, on version 0.8.2 it takes a few minutes, but on version 0.9.0 it doesn't finish at all. At one point it was 'building' for a few days. I assume it crashes, or times out and just retries infinitely.

frenck commented 2 years ago

Right, there is not much I can do about this from an add-on perspective. We cannot pre-build all packages out there. We add some additional resources that could provide a pre-build wheel to speed things up, but if those also don't provide those wheels, the only option is to build them.

huy-hng commented 2 years ago

I see, so the problem with is having to build the wheel from scratch and that causes a timeout or something similar? I'm running home assistant on a Pi4, which is admittedly not the most powerful device, but it should be more than enough to handle building wheels right? Is there a lot over overhead when it comes to building them in haos? Or is the timeout too short?

I assume that pip handles all the downloading and building, so I guess there is not much we can do except to wait for numpys wheel to be prebuild and uploaded to wheels.home-assistant.io?

frenck commented 2 years ago

Yes, or alternatively, install the package provided by Alpine Linux (as you can also install additional system packages with this add-on).

https://pkgs.alpinelinux.org/package/v3.16/community/x86_64/py3-numpy

huy-hng commented 2 years ago

Yes, or alternatively, install the package provided by Alpine Linux (as you can also install additional system packages with this add-on).

https://pkgs.alpinelinux.org/package/v3.16/community/x86_64/py3-numpy

this worked perfectly! Thank you Frenck :)