Giter Site home page Giter Site logo

Feature Request: Support ARM about fava-docker HOT 19 CLOSED

yegle avatar yegle commented on August 19, 2024
Feature Request: Support ARM

from fava-docker.

Comments (19)

yegle avatar yegle commented on August 19, 2024 1

Awesome!

from fava-docker.

yegle avatar yegle commented on August 19, 2024

Not really. I chose the distroless as the base image and there's no ARM version for the base image yet. See also: GoogleContainerTools/distroless#377

I would suggest to take a look at https://github.com/beancount/fava/tree/master/contrib/docker. This Docker file does not produce a minimal size image, but it should be easier to make it support ARM.

from fava-docker.

ngoonee avatar ngoonee commented on August 19, 2024

@yegle That docker file doesn't support ARM as-is anyway (at least for fava). Am still looking for a solution, any suggestions? I would guess I could use a buster base and just install fava from pip? Am also trying to get things together for a Pi3 I have lying around, which I think is similar to what you mentioned in the linked question at distroless.

from fava-docker.

yegle avatar yegle commented on August 19, 2024

@ngoonee The community wisdom is to use Alpine Linux as base image. You might be able to reuse many of the bits in the Dockerfile.

from fava-docker.

ngoonee avatar ngoonee commented on August 19, 2024

@yegle thanks, have you tried anything along those lines? After I posted the above I tried running fava 'bare' (not dockerised) and found performance to be surprisingly atrocious (not just slow, but close to a minute loading times for pages which normally take less than a second). Unless I can figure out why that happens, dockerising seems like it wouldn't help =(

from fava-docker.

ngoonee avatar ngoonee commented on August 19, 2024

An update on the above - I figured out with yagebu's help what the issue was (cdecimal was abysmally slow, see beancount/fava#1139 ) and the timings have improved tremendously. Now load times are only maybe 5-7 times slower than on a laptop. Still not very useful, but load times of 10 seconds aren't as bad as load times measured in minutes. I've still failed to build off a debian buster base for some reason though =(

from fava-docker.

fdw avatar fdw commented on August 19, 2024

Is there any way to help here? I'd love to run Fava on a RasPi.

from fava-docker.

ngoonee avatar ngoonee commented on August 19, 2024

Is there any way to help here? I'd love to run Fava on a RasPi.

Well the advise from yegle is up top. Basically you would need to rebuild off a debian base.

I've given up due to the above-mentioned performance issues. Turns out fava+beancount is a fairly heavy load (though not a consistent one). In the end I'm running it on a salvaged notebook with roughly 20W power draw. Double what my Pi+HDD drew, but much much more capable. Time is money after all.

from fava-docker.

yegle avatar yegle commented on August 19, 2024

The recommendation is still use https://github.com/beancount/fava/tree/master/contrib/docker to build an ARM64 version on your RasPi.

from fava-docker.

fdw avatar fdw commented on August 19, 2024

I finally had time to play with this, and I was able to build an image for linux/arm64/v8 without any changes. It works quite well on my Pi - a bit slower, but not problematic.

from fava-docker.

yegle avatar yegle commented on August 19, 2024

@fdw did you use the Dockerfile in this repo or the one at https://github.com/beancount/fava/tree/master/contrib/docker?

from fava-docker.

fdw avatar fdw commented on August 19, 2024

With this one 🙂

from fava-docker.

fdw avatar fdw commented on August 19, 2024

As it still works fine on Arm64, do you think you could add official images for that arch?

from fava-docker.

yegle avatar yegle commented on August 19, 2024

SGTM.

But I really want to publish a multi-arch image instead of having a separate tag for arm64 version. I'm also considering moving to GitHub Container Registry using GitHub Workflow as it might be challenging to build and push multi-arch image using Docker Hub.

It might take a while to make the switch and add arm64 support.

from fava-docker.

fdw avatar fdw commented on August 19, 2024

Both sound good 🙂

I've used docker buildx build... to cross-build for ARM64. From what I can find, that seems to be also work for multi-arch images: https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/

from fava-docker.

fdw avatar fdw commented on August 19, 2024

Have you made any progress here? Anything I can help with?

from fava-docker.

yegle avatar yegle commented on August 19, 2024

The work to set up the Github Actions and push to Docker Hub was done.

I have not made any progress on building a multi-arch image.

from fava-docker.

yegle avatar yegle commented on August 19, 2024

I'm a bit fuzzy on what architecture is required to run binary on RasPi, but it looks like Distroless only added arm64 support.

docker manifest inspect --verbose gcr.io/distroless/python3-debian10:latest|grep architecture
                                "architecture": "amd64",
                                "architecture": "arm64",

The current published image of yegle/fava:latest should now contain both amd64 and arm64 version.

@rlue @ngoonee @fdw if any of you are still interested please let me know if it works for you.

from fava-docker.

fdw avatar fdw commented on August 19, 2024

I'm a bit fuzzy on what architecture is required to run binary on RasPi

You can run it with arm64.

if any of you are still interested please let me know if it works for you.

I've tried it and it seems to work fine. Thank you very much! 🙂

from fava-docker.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.