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

Add support for ARM64 #28

Open
wearemassive opened this issue Jan 20, 2024 · 6 comments
Open

Add support for ARM64 #28

wearemassive opened this issue Jan 20, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@wearemassive
Copy link

The app will currently not run on a ARM64 platform (raspberry pi), it errors out with a exec format error. I believe it's because the version of python used is not built with ARM support by default.

docker-library/python#798 talks about the issue.

I'd love to run the project, but my little home-lab RPI is not able to join in the fun.

@nezhar nezhar added the help wanted Extra attention is needed label Apr 14, 2024
@nezhar
Copy link
Contributor

nezhar commented Apr 14, 2024

I like the idea, did you try to build it locally?
We will need to build all containers for this architecture in order to work properly.

@nezhar
Copy link
Contributor

nezhar commented Apr 15, 2024

Adding this to the pipelines is still in progress.

Meanwhile you can test it using theese images:

You can define them directly into your local .env file

API_VERSION=test-multi-platform
API_REMOTE=ghcr.io/snypy/snypy-backend
STATIC_REMOTE=ghcr.io/snypy/snypy-static

UI_VERSION=test-multi-platform
UI_REMOTE=ghcr.io/snypy/snypy-frontend

@nezhar
Copy link
Contributor

nezhar commented May 23, 2024

I wanted to test this with my raspberry pi, but it is appereantly running on arm7

pi@raspberrypi:~/snypy-docker $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~/snypy-docker $ uname -a
Linux raspberrypi 5.15.32-v7+ #1538 SMP Thu Mar 31 19:38:48 BST 2022 armv7l GNU/Linux

I get however also some details after the docker compose pull

WARNING: Some service image(s) must be built from source by running:
    docker compose build static api ui
3 errors occurred:
	* no matching manifest for linux/arm/v7 in the manifest list entries
	* no matching manifest for linux/arm/v7 in the manifest list entries
	* no matching manifest for linux/arm/v7 in the manifest list entries

I will try to extend the supported builds using buildx, it should be possible however to run docker compose build locally.

@nezhar
Copy link
Contributor

nezhar commented May 23, 2024

QEMU is also required on Linux in order to build arm/v6 and arm/v7

https://stackoverflow.com/a/71533008/5382179

@nezhar
Copy link
Contributor

nezhar commented May 24, 2024

The new builds are now compatible with arm/v7

I was now able to run the all containers on my Raspberry Pi 3 Model B ARM-Cortex-A53

Here is also an exmaple docker-compose.override.yml

version: "3"

services:
  api:
    environment:
      ALLOWED_HOSTS: "192.168.178.34"
      SECRET_KEY: "changeme!"
      EMAIL_URL: "smtp://mail:1025"
      STATIC_URL: "http://192.168.178.34:8081"
      CORS_ORIGIN_WHITELIST: "http://192.168.178.34:8080"
      CSRF_TRUSTED_ORIGINS: "http://192.168.178.34"
      REGISTER_VERIFICATION_URL: "http://192.168.178.34:8080/verify-user/"
      RESET_PASSWORD_VERIFICATION_URL: "http://192.168.178.34:8080/set-password/"
      REGISTER_EMAIL_VERIFICATION_URL: "http://192.168.178.34:8080/verify-email/"
      SENTRY_ENABLED: "False"
    ports:
      - "8000:8000"
    volumes:
      - ./data/fixtures/:/fixtures/

  static:
    ports:
      - "8081:80"

  ui:
    environment:
      REST_API_URL: "http://192.168.178.34:8000"
    ports:
      - "8080:80"

  mail:
    image: msztolcman/sendria:v2.2.2.0
    ports:
      - "1080:1080"

We might need to look for an alternative to sendria that supports arm64 and arm/v7

@nezhar
Copy link
Contributor

nezhar commented May 24, 2024

I was also able to run the containers on arm64 using an VPS 1000 ARM G11

Linux 6.1.0-21-arm64 #1 SMP Debian 6.1.90-1 (2024-05-03) aarch64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants