Rbillon59 / hass-deepstack

Deepstack Home assistant addon. Deploy your deepstack instance directly beside home assistant
Apache License 2.0
5 stars 1 forks source link

docker issue on recent hassos #2

Closed gretel closed 1 year ago

gretel commented 1 year ago

image

RUN apt-get update
RUN apt-get -y install jq

think update is required cause install requires the package index to be present.

Rbillon59 commented 1 year ago

Hello @gretel, I just tried to rebuild and reinstall the add-on on my personal instance and did not face any issue.

Could you please describe a bit more your installation and version?

Thank you

gretel commented 1 year ago

Could you please describe a bit more your installation and version?

image

on rpi4. personally i'm using https://github.com/hadolint/hadolint to ensure valid Dockerfile.

Rbillon59 commented 1 year ago

I just tried to update my instance and rebuild the add-on, it's working great. But I'm on amd64 arch.

I tried to build on arm and faced no issues.

I also ran hadolint against the Dockerfile (tool I did not know, thanks for the discovery) and no issues encountered.

Did you try multiple times ? The error shows an issue during the apt install phase. This could mean an issue downloading the package, so a possible networking issue. Also did you check the space left on your Rpi ? The base image is quite large and then tries to install the package. Could be a space issue as well.

gretel commented 1 year ago

@Rbillon59 thanks, and for checking with hadolint. we are both on the wrong track as the supervisor log indicates:

23-04-14 14:20:15 INFO (SyncWorker_1) [supervisor.docker.addon] Starting build for 3cfc8f0f/aarch64-addon-hass-deepstack:0.0.1
23-04-14 14:21:38 ERROR (SyncWorker_1) [supervisor.docker.addon] Can't build 3cfc8f0f/aarch64-addon-hass-deepstack:0.0.1: The command '/bin/sh -c apt install -y jq' returned a non-zero code: 1
23-04-14 14:21:38 ERROR (SyncWorker_1) [supervisor.docker.addon] Build log: 
Step 1/9 : FROM deepquestai/deepstack:cpu
 ---> d39ec65c47f2
Step 2/9 : RUN apt install -y jq
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in 887ac3a80e61
exec /bin/sh: exec format error

looks like the tagging is bit arbitrary 😄 https://hub.docker.com/layers/deepquestai/deepstack/arm64-server/images/sha256-5850e5046e1fd2f7a7f0c2676e607a1a4857e31016b232b727728b6220d29233?context=explore

Rbillon59 commented 1 year ago

Oh true, so it's an issue with the CPU architecture.

I will check what I can do to support arm64

gretel commented 1 year ago

cool. think a "common solution" is to offer a repository per architecture 😞

gretel commented 1 year ago

btw, i'm also looking at https://github.com/grinco/HASS-coral-rest-api because i have a device but frigate without the paid models (frigate+) is not very usable in my case.

Rbillon59 commented 1 year ago

I haven't a lot of time now, so I will probably touch that next week.

Also, I believe I will build multi arch Addon and publish directly the image to avoid having to built it locally

https://developers.home-assistant.io/docs/add-ons/publishing/#build-scripts-to-publish-add-ons-to-a-container-registry

gretel commented 1 year ago

sure thanks!

Rbillon59 commented 1 year ago

Hi @gretel I've updated the addon so aarch64 should be buildable. Could you test to install the addon please ? I've no arm64 to test it

gretel commented 1 year ago

Screenshot 2023-04-18 at 23 10 54 Screenshot 2023-04-18 at 23 10 48

thanks, looking quickly looks like it's werking fine!

Rbillon59 commented 1 year ago

Awesome, I'am closing the issue, enjoy !