Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: make a Docker image that is compatible with ARM devices #2648

Open
Travis42 opened this issue Dec 15, 2019 · 24 comments
Open

Request: make a Docker image that is compatible with ARM devices #2648

Travis42 opened this issue Dec 15, 2019 · 24 comments

Comments

@Travis42
Copy link

Travis42 commented Dec 15, 2019

After a 2 day long battle with dependency hell and compiling from source for my Raspberry Pi, then trying the docker image route only to realize that there is no ARM image...I'm ready to give up.

Here's my rough journey on the local install/compile side, if you're curious:

Steps to get Huginn to work on Raspi:

#2299
https://github.com/huginn/huginn/wiki/Novice-setup-guide

  • sudo apt-get install libmariadb-dev mysql-client mysql-common mysql-server

  • cp .env.example .env

  • change versions in Gemfile

    • libv8 to 5.3.332.38.5
    • mini_racer to 0.1.9
  • update Gemfile.lock by doing:

    • bundle lock --update
  • for nokogiri (it has to compile from source on a raspberry pi:

    • sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
  • 'devise' also has to compile, requires bcrypt

    • sudo apt-get install ruby-bcrypt
    • modify Gemfile.lock so that the bcrypt dependency is 3.1.11-1 (or whatever the apt repo version happens to be)
  • mysql2 error

    • sudo apt-get install libmariadb-dev
    • sudo gem install mysql2 -v '0.5.3'
    • bundle
  • bundle exec rake db:create

    • crashed here, and I'm stuck.
  • Massive error readout follows, but here are the probable important bits:

WARNING: description and summary are identical
WARNING: See http://guides.rubygems.org/specification-reference/ for help
WARNING: description and summary are identical
WARNING: open-ended dependency on spring (>= 0, development) is not recommended
if spring is semantically versioned, use:
add_development_dependency 'spring', '~> 0'

WARNING: See http://guides.rubygems.org/specification-reference/ for help
WARNING: description and summary are identical
WARNING: See http://guides.rubygems.org/specification-reference/ for help
WARNING: description and summary are identical
WARNING: open-ended dependency on spring (>= 0, development) is not recommended
if spring is semantically versioned, use:
add_development_dependency 'spring', '~> 0'
WARNING: See http://guides.rubygems.org/specification-reference/ for help
/var/lib/gems/2.3.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:18: [BUG] Bus Error at 0x15577e2
ruby 2.3.3p222 (2016-11-21) [arm-linux-gnueabihf]
...
-- Control frame information -----------------------------------------------
(ton of stuff)
...
-- Ruby level backtrace information ---------------------------------------
(ton of stuff)
...
-- Other runtime information -----------------------------------------------
(ton of stuff)

  • Loaded script: /usr/local/bin/rake

  • Loaded features:
    ...

  • Process memory map:
    ...
    [NOTE]
    You may have encountered a bug in the Ruby interpreter or extension libraries.

@dsmith3210
Copy link

That bus error looks like this bootsnap issue, there are a few mitigations in that thread.

@ch40s
Copy link

ch40s commented Dec 30, 2019

@Travis42 were you able to resolve this? It's so bad that there is no easy way to install huginn on some powerful arm based SBCs these days.

@Travis42
Copy link
Author

Travis42 commented Dec 30, 2019

@ch40s I tried all sorts of options over a 2 week period. Never got Huginn to work on an ARM device, as there was always some dependency to compile that I couldn't make work, despite advice. I messed with different versions of dependencies such as libv8, mini_racer, nokogiri, devise, bcrypt, etc. I did my best to cut out bootsnap.

I think it was the rake dependency on bcrypt that finally made me call it a wash for ARM.

Aside: I did manage to get the docker image working on a digital ocean droplet (easily). The problem there is that once you have it running, there is no user created within the docker image. I'm not very savvy with Docker, so that was another dead end as I tried to figure out the chicken or egg game there with modifying configuration files, setting up SSL, etc. I came at it from the Docker angle, as well as regular install attempts paired with CapRover and Yunohost. For the former, I couldn't edit/configure. For the latter two, I couldn't get the install of Huginn or Docker container version to play nice.

I admit defeat.

@ch40s
Copy link

ch40s commented Jan 1, 2020

@Travis42 I totally agree with you! Pretty disappointing. Would you be willing to share your arm docker image for testing purposes?

@Travis42
Copy link
Author

Travis42 commented Jan 1, 2020 via email

@PatrickLohan
Copy link

Just wanted to add so that the devs know there are more than two people interested in arm installs/dockers. Same as Travis42 but even more masochistic in that I'm now about 3 weeks in. I can only take so much before I give up.

The rpi4 is the PERFECT board for Huginn. 4 cores and 4gb RAM, set it up mostly headless and leave it to run on 7w electricity in a cold corner somewhere. It has also been out since last... June? I'd be willing to lend a hand if someone who knows the project can hand hold.

If not then I'm not sure I want to set this up on my daily driver laptop, already too many things going on on it.

@STRAYKR
Copy link

STRAYKR commented Apr 12, 2020

Yes, another armhf Raspberry Pi user here. Interested to be able to put Huginn on a Pi via Docker also.

@mhalano
Copy link

mhalano commented Apr 24, 2020

I used the Docker from the Ubuntu's repository (Docker's repo doesn't work) and after I executed the line to run the container I got on console:
standard_init_linux.go:211: exec user process caused "exec format error"
So I'm a plus one Huginn on ARM64.

@sfischer13
Copy link
Contributor

Please have a look at #2563. I run Huginn on Docker on a Raspberry Pi 4. Unfortunately, I still use an armhf image. At the time of my setup, arm64 support was quite frustrating.

@mmm286
Copy link

mmm286 commented May 11, 2020

Hi! I'm very interesting in install docker in rasp 4.
Do you know if it's functional? performance??
Thanks

@dsander
Copy link
Collaborator

dsander commented Jun 9, 2020

I've taken the name of the competitor out of this post

My reactions had nothing to do with you mentioning another project. In my mind there are no "competitors" in non commercialized open source. Nobody gains or looses anything from a user or non-user.

I offered help, with the caveat of needing a little guidance, and no one was forthcoming.

I know that sucks, but that is also open source. If nobody cares about it enough to work on on a problem noone else gets the feature or the support.

To me your posts sound like they have the intention to pressure contributors and maintainers into something. Everybody is doing this in their free time and the license literally says you get what you get or what you make of it. In my experience complaining or finger pointing never got anyone to do anything in open source.
Instead document what steps worked, what didn't and pave the way for the next person to pick up on your work.

I am personally not interested in running Huginn on ARM but would love to see contributions that enable it.

@v9999
Copy link

v9999 commented Jan 11, 2021

Hey there, I tried pulling and running a image to run on my Raspberry Pi 4 and I noticed it's only x86 right?
I'd love to try this out on ARM64.
Thanks.

@carlogarro
Copy link

Do we have already a functional docker image for arm?

@itd24
Copy link

itd24 commented Mar 21, 2021

this is a joke, ARM processors are the standard by now and project like these, even if they are open source, should support ARM

@dsander
Copy link
Collaborator

dsander commented Mar 21, 2021

this is a joke, ARM processors are the standard by now and project like these, even if they are open source, should support ARM

I didn't get the punchline, is it supposed to be a joke about ARM or open source software?

@kjboa
Copy link

kjboa commented Apr 16, 2021

this is a joke, ARM processors are the standard by now and project like these, even if they are open source, should support ARM

Completly agree. Tried setting it up on my SBC and it was hell, never worked properly.

@SethPyle376
Copy link

I found this image somebody else made for ARM and have been using it on an RPI4 4gb to good effect.

@zhorvath83
Copy link

I found this image somebody else made for ARM and have been using it on an RPI4 4gb to good effect.

This image was built by me, but the merit belongs to @sfischer13 because of his Huginn armhf branches.

@JDragonB
Copy link

Hi!
I try to run zhorvath83/huginn container on my raspberry pi but i have this message :
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error

I have forget something?


System Information

Raspberry Pi 4 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"

Linux raspberrypi 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux
Revision : c03112
Serial : 100000009424b7f8
Model : Raspberry Pi 4 Model B Rev 1.2

@SethPyle376
Copy link

SethPyle376 commented Nov 4, 2021

Hi! I try to run zhorvath83/huginn container on my raspberry pi but i have this message : WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested standard_init_linux.go:228: exec user process caused: exec format error

I have forget something?

System Information

Raspberry Pi 4 Model B Rev 1.2 PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)"

Linux raspberrypi 5.10.52-v7l+ #1441 SMP Tue Aug 3 18:11:56 BST 2021 armv7l GNU/Linux Revision : c03112 Serial : 100000009424b7f8 Model : Raspberry Pi 4 Model B Rev 1.2

Late reply but in case you haven't figured it out already you're running armv7 which is 32bit. Like the error says you need to be running an arm64 OS. There's 64bit Raspbian builds available here and I think Ubuntu also has 64 bit arm build available

@unixfox
Copy link

unixfox commented Jan 11, 2022

I just created a Docker image of Huginn single process compatible with ARMv7/armhf, ARMv8/aarch64 and intel x86. This image is automatically updated for every new commit on https://github.com/huginn/huginn.
You can find it here: https://quay.io/repository/unixfox/huginn-single-process
The source code of my Dockerfile is here: https://github.com/unixfox/periodic-build-with-github-actions/blob/master/huginn/single-process/Dockerfile

I have no plans to support the multiple processes docker image of Huginn because I don't use it myself, and it is more difficult to build.

@SethPyle376
Copy link

@unixfox funny seeing you here, I use your ARM nitter image :D

adamus1red added a commit to adamus1red/huginn that referenced this issue Nov 3, 2022
Add setup-qemu and setup-buildx actions to give docker the ability to build multiple architecture builds
Remove call to `./build_docker_image.sh` 
Replace docker build script with build-push action from docker.
Add basic metadata tagging.

REF: huginn#2648
adamus1red added a commit to adamus1red/huginn that referenced this issue Nov 3, 2022
* Add setup-qemu and setup-buildx actions to give docker the ability to build multiple architecture builds
* Remove call to `./build_docker_image.sh` 
* Replace docker build script with build-push action from docker.
* Add basic metadata tagging.

REF: huginn#2648
@x0tester0x
Copy link

When will the ARM docker image support be available?
I need this feature.

@Lippiece
Copy link

Lippiece commented May 1, 2024

I found this image somebody else made for ARM and have been using it on an RPI4 4gb to good effect.

For someone stumbling upon this, this image is the only thing here that works, at least by my experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests