alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
871 stars 241 forks source link

How to run server on armv7 with docker #216

Open hatzisn opened 1 year ago

hatzisn commented 1 year ago

Good morning sir,

I am not completely sure I understand what you write here:

======================================================== "You can cross-compile for RPi, it is much faster. We are doing it here: https://github.com/alphacep/vosk-api/blob/master/travis/Dockerfile.dockcross

As for docker, it doesn't work on ARM. Instead, you can install vosk with pip and clone and run the server."

Do you mean that it runs on armv7 and on? I tried with the dockerfile you mention in the link in raspberry pi 4B 4GB and docker version 20.10.5 and I get this error...


Step 1/7 : ARG DOCKCROSS_IMAGE=alphacep/dockcross-linux-armv7 Step 2/7 : FROM ${DOCKCROSS_IMAGE} latest: Pulling from alphacep/dockcross-linux-armv7 27833a3ba0a5: Pull complete 5c48f1db2628: Pull complete 80a0794c56a5: Pull complete 9fb82c195262: Pull complete 41a971ead397: Pull complete bb041d55ef72: Pull complete d4094beb3fa2: Pull complete 8f82338edd79: Pull complete 337783ef0c20: Pull complete 04a3ad3d55d7: Pull complete c634e9e1d660: Pull complete 59b2b730dd40: Pull complete 9cd6cd1e3b31: Pull complete ee26a6b1a9b9: Pull complete 7f8f0c530d93: Pull complete 025b9af3775e: Pull complete Digest: sha256:19df925d5be45d8bfd2b3f8a2cb3637642f21fa626cc5ba93b5a663455530729 Status: Downloaded newer image for alphacep/dockcross-linux-armv7:latest ---> f5fc3bba6b6c Step 3/7 : LABEL description="A docker image for building portable Python linux binary wheels and Kaldi on other architectures" ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested ---> Running in eedbd274ba9f Removing intermediate container eedbd274ba9f ---> 7e7ea65c497c Step 4/7 : LABEL maintainer="contact@alphacephei.com" ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested ---> Running in 5aea50dfd28e Removing intermediate container 5aea50dfd28e ---> 0e7a4a2765c6 Step 5/7 : RUN apt-get update && apt-get install -y --no-install-recommends wget libffi-dev libpcre3-dev zlib1g-dev automake autoconf libtool cmake python3 python3-pip python3-wheel python3-setuptools python3-cffi && rm -rf /var/lib/apt/lists/ ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested ---> Running in ea60932ba6f3 standard_init_linux.go:219: exec user process caused: exec format error The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends wget libffi-dev libpcre3-dev zlib1g-dev automake autoconf libtool cmake python3 python3-pip python3-wheel python3-setuptools python3-cffi && rm -rf /var/lib/apt/lists/' returned a non-zero code: 1


What is wrong ?

hatzisn commented 1 year ago

Never mind, I did not notice completely this: "The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7)". Can you please advise me on what to do (because a linux/amd64 image is downloaded and the proper files cannot be run under linux/arm/v7 )?

nshmyrev commented 1 year ago

You run the server without docker:

pip3 install vosk
git clone https://github.com/alphacep/vosk-server
cd vosk-server/websocket
./asr_server.py

Thats it