stanford-oval / genie-server

The home server version of Almond
Apache License 2.0
268 stars 42 forks source link

No suitable images for architectures other than amd64 e.g. for RaspberryPi #228

Open Aaper opened 3 years ago

Aaper commented 3 years ago

The Docs mention that almond-server should run on RaspberryPi 3 + 4 but there is not suitable Image in the Dockerhub for architectures other than amd64 as you can see under the tags section.

So executing the documented run command on a RaspberryPi 3 running Raspian Buster (armhf) podman run --name almond -p 3000:3000 stanfordoval/almond-server:latest-portable

will lead to the following error {"msg":"exec container process `/usr/bin/npm`: Exec format error","level":"error","time":"2021-06-29T16:56:28.000196786Z"}

This non-matching architecure errors are also mentioned in the Podman Docs.

Could you please provide images for other architectures aswell?

techkujaku commented 3 years ago

Yeap, can't get it to run on my pi4 via portainer. the error is related to wrong architecture

standard_init_linux.go:228: exec user process caused: exec format error

kratosok commented 3 years ago

So I just found out about this project and have been very excitedly researching it.. I saw the build didn't support rpi in docker hub..

I was however able to build an image for docker/podman for arm64.

Step 1) git clone https://github.com/stanford-oval/almond-server.git Step 2) cd almond-server Step 3) docker build -t almond-server . OR if you are using podman podman build -t almond-server .

Why this works: building the container image yourself lets your docker/podman engine try to build from the base image that works for your architecture.

Downside- I have built the container successfully, but I can't get it to run.. but I think this is related to some pulse issue I'm going to try to work out since I run RPI headless with a server distro and no pulse.

current runtime error:

> almond-server@2.0.1 start /opt/almond
> node dist/main.js

Frontend initialized in development mode
Failed to load translations: The expression evaluated to a falsy value:

  assert_1.default(fs.existsSync(modir))

Snowboy initialized
Uncaught exception: Not available
Error: Not available
    at new Context (/opt/almond/node_modules/canberra/index.js:102:24)
    at new SoundEffectsApi (/opt/almond/dist/service/platform/index.js:201:21)
    at ServerPlatform._ensurePulseAudio (/opt/almond/dist/service/platform/index.js:371:38)
    at ServerPlatform.hasCapability (/opt/almond/dist/service/platform/index.js:417:22)
    at new AssistantEngine (/opt/almond/node_modules/genie-toolkit/dist/lib/engine/index.js:96:22)
    at init (/opt/almond/dist/main.js:62:15)
    at main (/opt/almond/dist/main.js:147:19)
Cleaning up
gcampax commented 3 years ago

The error indicates that PulseAudio is not available in the container. You need to mount it from outside, using the podman command in the README.