guydavis / machinaris

An easy-to-use WebUI for crypto plotting and farming. Offers Bladebit, Gigahorse, MadMax, Chiadog and Plotman in a Docker container. Supports Chia, MMX, Chives, Flax, and HDDCoin among others.
Apache License 2.0
337 stars 69 forks source link

Support for Raspberry Pi 64 bit (aarch64) #155

Closed lestd closed 3 years ago

lestd commented 3 years ago

The Linux containers don't seem to support aarch64 on my Raspberry Pi 4 full node (Raspbian 64)

Linux raspberrypi 5.10.17-v8+ #1403 SMP PREEMPT Mon Feb 22 11:37:54 GMT 2021 aarch64 GNU/Linux

root@raspberrypi:/ # docker logs machinaris standard_init_linux.go:207: exec user process caused "exec format error"

Thanks!

raspi-ninja commented 3 years ago

I wanted to setup my NanoPi M4 board as a harvester and had the same issue. I got it working by building docker image on the device. Essentially building it for an aarch64.

i still ran into some weird issues but now it's running fine. Sorry for the vague details but hope it puts you on the right track.

elexx commented 3 years ago

I tried cross-building the image for aarch64 with

docker buildx build --progress plain --platform linux/arm64 --build-arg CHIA_BRANCH=1.2.2 --build-arg FLAX_BRANCH=main .

but ran into:

#5 271.1 Errors were encountered while processing:
#5 271.1  libc-bin
#5 271.2 E: Sub-process /usr/bin/dpkg returned an error code (1)
#5 ERROR: executor failed running [/bin/sh -c apt-get update    && apt-get install -y       acl         apt         bash        bc      build-essential         ca-certificates         curl        git         jq      nfs-common      openssl         python3         python3.9-distutils         python3.9-venv      python3-dev         python3-pip         python-is-python3       sqlite3     sudo        tar         tzdata      unzip       vim         wget        cmake       rsync       libsodium-dev       iputils-ping            && rm -rf       /tmp/*      /var/lib/apt/lists/*        /var/tmp/*]: exit code: 100
------
 > [package_stage 2/2] RUN  apt-get update  && apt-get install -y       acl         apt         bash        bc      build-essential         ca-certificates         curl        git         jq      nfs-common      openssl         python3         python3.9-distutils         python3.9-venv      python3-dev         python3-pip         python-is-python3       sqlite3     sudo        tar         tzdata      unzip       vim         wget        cmake       rsync       libsodium-dev       iputils-ping            && rm -rf       /tmp/*      /var/lib/apt/lists/*        /var/tmp/*:
------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apt-get update     && apt-get install -y       acl         apt         bash        bc      build-essential         ca-certificates         curl        git         jq      nfs-common      openssl         python3     python3.9-distutils         python3.9-venv      python3-dev         python3-pip     python-is-python3       sqlite3         sudo        tar         tzdataunzip         vim         wget        cmake       rsync       libsodium-dev iputils-ping          && rm -rf       /tmp/*      /var/lib/apt/lists/*    /var/tmp/*]: exit code: 100

Any ides if this is just a problem wenn cross-building or did you have the same problem, when building directly on your NanoPi M4, @raspi-ninja?

guydavis commented 3 years ago

Hi! For those with Raspberry Pi 64-bit systems, please give the latest ghcr.io/guydavis/machinaris:develop image a try. As of latest build, the arm64 architecture is enabled, but I don't have any hardware to try running it. Here's the details on GHCR and DockerHub.

In particular, you'll need an existing Machinaris controller running on another PC, as it really only makes sense to launch a Machinaris worker (mode=harvester) on the RaspPi I think. Please let me know how things go. In particular, please provide the logs. Thanks!

guydavis commented 3 years ago

Heard from a user on Discord that this is working well for his RaspberryPi. Will ensure this becomes part of regular build process.

guydavis commented 3 years ago

Closing as released in v0.5.2 now.

SquareMesh commented 2 years ago

Hi @guydavis , Just tried fresh install of docker image in Raspberry Pi 4 using .yml from docker app.
Initially got error (using :latest in yml) .. which brought me to this issue

pi@raspberrypi:~/machinaris $ sudo docker-compose up -d --force-recreate Pulling machinaris (ghcr.io/guydavis/machinaris:latest)... latest: Pulling from guydavis/machinaris ERROR: no matching manifest for linux/arm/v7 in the manifest list entries

Then changed to :develop, which allowed me to create image, however docker container doesn't run and is showing the following message..

pi@raspberrypi:~/machinaris/machinaris/docker $ sudo docker logs machinaris standard_init_linux.go:228: exec user process caused: exec format error standard_init_linux.go:228: exec user process caused: exec format error

Apologies for tagging against older closed issue, let me know if you would like a new issue raised?

guydavis commented 2 years ago

Hi, sorry. Sounds like you are trying to run with a 32-bit RaspPiOS version. This isn't supported by Machinaris or by Chia. Please try to switch to a 64-bit OS if you can.

As for the :develop images, they support x86_64 only for speed of build time. They won't run on any RaspPi device, so please stick with the :latest images which is the latest official release.

SquareMesh commented 2 years ago

Hi @guydavis , Sorry, meant to check earlier and forgot, yeah you are correct, I'm using 32bit OS.. I had assumed the new download was 64 bit, my mistake. Thanks for prompt reply.

SquareMesh commented 2 years ago

Hi @guydavis , just a follow up to say it is all working after install 64bit OS. Thanks for your help.