cogentapps / chat-with-gpt

An open-source ChatGPT app with a voice
https://www.chatwithgpt.ai
MIT License
2.31k stars 493 forks source link

Failing to run on ARM / Raspberry Pi #40

Open sommerper opened 1 year ago

sommerper commented 1 year ago

Hi!

Wanted to test this out on my small home server but I couldn't get it up and running.

I get the error:

Attaching to chatwithgpt-cogentapps-1
chatwithgpt-cogentapps-1  | exec /usr/local/bin/docker-entrypoint.sh: exec format error
chatwithgpt-cogentapps-1 exited with code 1

I've seen this before when the image wasn't ARM compatible.

Just FYI.

cogentapps commented 1 year ago

The docker image now includes a version for ARM.

Would you be able to test and see if it works?

docker pull ghcr.io/cogentapps/chat-with-gpt:release
docker run -v $(pwd)/data:/app/data -p 3000:3000 ghcr.io/cogentapps/chat-with-gpt:release
reinob commented 1 year ago

I tried the above but the docker image is still amd64, even if you

$ docker pull --platform linux/arm64/v8 ghcr.io/cogentapps/chat-with-gpt:release

you still have

$ docker inspect ghcr.io/cogentapps/chat-with-gpt:release | grep Arch
        "Architecture": "amd64",
sommerper commented 1 year ago

I pulled the latest and it still throws the error.

~/docker/chatwithgpt
❯ docker-compose pull
[+] Running 14/14
 ⠿ cogentapps Pulled                                                                                                                                                          50.6s
   ⠿ 63b65145d645 Already exists                                                                                                                                               0.0s
   ⠿ bc59db64d63d Pull complete                                                                                                                                               23.6s
   ⠿ c8fd6d18c4a0 Pull complete                                                                                                                                               24.0s
   ⠿ eb563838426b Pull complete                                                                                                                                               24.1s
   ⠿ 06c6bcf0f0eb Pull complete                                                                                                                                               24.4s
   ⠿ d58b902867ad Pull complete                                                                                                                                               24.6s
   ⠿ f0e7e688716c Pull complete                                                                                                                                               24.8s
   ⠿ ebede05b6017 Pull complete                                                                                                                                               24.9s
   ⠿ 511deccdd15b Pull complete                                                                                                                                               41.1s
   ⠿ 55364b240ecf Pull complete                                                                                                                                               48.9s
   ⠿ c363fe49e713 Pull complete                                                                                                                                               49.0s
   ⠿ e0e18c2c0d2b Pull complete                                                                                                                                               49.2s
   ⠿ 29d6d12e1f51 Pull complete                                                                                                                                               49.4s

~/docker/chatwithgpt took 50s
❯ docker-compose up
[+] Running 1/1
 ⠿ Container chatwithgpt-cogentapps-1  Recreated                                                                                                                               0.1s
Attaching to chatwithgpt-cogentapps-1
chatwithgpt-cogentapps-1  | exec /usr/local/bin/docker-entrypoint.sh: exec format error
chatwithgpt-cogentapps-1 exited with code 1

My docker-compose.yml:

❯ cat docker-compose.yml
version: '3.3'
services:
    cogentapps:
        volumes:
            - './data:/app/data'
        ports:
            - '3487:3000'
        image: 'ghcr.io/cogentapps/chat-with-gpt:release'% 
tanushshukla commented 1 year ago

yeah same issue for me too.

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

ErfanDL commented 1 year ago

same here, can't be running on Raspberry Pi4 exec /usr/local/bin/docker-entrypoint.sh: exec format error

b0mbard1er commented 1 year ago

PR #109 demonstrates building the docker locally which could work as a solution. Just tried it and it is working well on a Pi4 running 64-bit Raspberry Pi OS.

cogentapps commented 1 year ago

The GitHub Action that I was using to deploy the ARM image was taking hours to run (and often failing), probably due to virtualization, so I removed it temporarily. I haven't had an opportunity to write a new one.

PRs for a new GitHub action are welcome, if anyone wants to take a stab at solving this.

Preferably a new workflow, separate from the existing docker build workflow, that builds and deploys in a relatively short period of time.

AienTech commented 1 year ago

arm support is very much appreciated.

currently getting:

2023-05-16T23:37:26.962765142Z exec /opt/nvidia/nvidia_entrypoint.sh: exec format error
2023-05-16T23:37:32.788802356Z exec /opt/nvidia/nvidia_entrypoint.sh: exec format error
2023-05-16T23:37:38.597547827Z exec /opt/nvidia/nvidia_entrypoint.sh: exec format error
2023-05-16T23:37:44.453824339Z exec /opt/nvidia/nvidia_entrypoint.sh: exec format error