OpenBB-finance / OpenBB

Investment Research for Everyone, Everywhere.
https://openbb.co
Other
33.98k stars 3.11k forks source link

[Bug] can't run docker image #6689

Open rafaelfliu opened 1 month ago

rafaelfliu commented 1 month ago

Describe the bug Pulled the docker image successfully, but unable to run a container off the image. Encountered the following error message:

The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v4) and no specific platform was requested.
exec /usr/local/bin/uvicorn: exec format error

To Reproduce

  1. docker pull ghcr.io/openbb-finance/openbb-platform:latest
  2. docker run --rm -p 8000:8000 ghcr.io/openbb-finance/openbb-platform

Screenshots N.A.

Desktop (please complete the following information):

Additional context N.A.

tebrizetayi commented 1 month ago

It does not work for me either

ash34 commented 1 month ago

Because the docker image has been created for an ARM architecture only. It would work on a raspberry pi but most of us are on X86/AMD64.

SurvivaLlama commented 1 month ago

any chance we can get a docker for X86?

deeleeramone commented 1 month ago

Alternatively, you can use the Dockerfile and spec it to your specific needs.

asfourco commented 1 month ago

@deeleeramone, not sure this should be classified as a bug unless the CI/CD tools are meant to deploy multi-arch docker images.

The manual steps to build would be (docs reference):

  1. Clone the repo
  2. Assuming you have docker setup on your machine, rebuild for your machine using the command without using the existing image: docker buildx build --platform linux/amd64 -f build/docker/platform.dockerfile -t openbb-platform:latest --no-cache . Make sure to run this from the root of the OpenBB project
  3. Run the container: docker run --rm -p 8000:8000 -v ~/.openbb_platform:/root/.openbb_platform openbb-platform:latest
  4. confirm by navigating to http://localhost:8000/docs this should return the openAPI documentation

N.B. if you get the message that http://deb.debian.org cannot resolve, then modify the build command by adding the following flag --network=host, i.e., docker buildx build --platform linux/amd64 -f build/docker/platform.dockerfile -t openbb-platform:latest --network=host --no-cache .