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

[Bug]: Only the arm64 docker image is published to dockerhub #1096

Closed
gemmell opened this issue Dec 29, 2023 · 5 comments · Fixed by #1111
Closed

[Bug]: Only the arm64 docker image is published to dockerhub #1096

gemmell opened this issue Dec 29, 2023 · 5 comments · Fixed by #1111
Labels
bug Something isn't working docker Issues relating to Docker

Comments

@gemmell
Copy link
Collaborator

gemmell commented Dec 29, 2023

Describe the bug

I went to try this out via the easy route as per the instructions:

docker pull yuandongtian/autogen:latest
docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8081:8081 docker.io/yuandongtian/autogen:latest

But only the arm64 image is published, meaning it doesn't run on regular intel machines:

$ docker run -it -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8081:8081 docker.io/yuandongtian/autogen:latest
WARNING: 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 /venv/bin/autogenra: exec format error

And if you look in dockerhub, sure enough, there really is just one architecture supported: linux/arm64/v8
https://hub.docker.com/r/yuandongtian/autogen/tags

Need to use docker buildx to cross compile for other architectures.

Steps to reproduce

Try and run the docker image on a intel linux machine.

Expected Behavior

It runs the docker image.

Screenshots and logs

No response

Additional Information

No response

@gemmell gemmell added the bug Something isn't working label Dec 29, 2023
@rickyloynd-microsoft
Copy link
Contributor

@sonichi

@sonichi
Copy link
Contributor

sonichi commented Dec 30, 2023

@qingyun-wu could you take a look at this issue? I think it's a good idea to provide a quick start point using docker, but the current guidance is incomplete in several aspects:

  1. How to use the docker image in non-web UI interface.
  2. What architecture is supported.
  3. What's the plan to support other architectures.

@sonichi sonichi added the docker Issues relating to Docker label Dec 30, 2023
@yuandong-tian
Copy link
Collaborator

yuandong-tian commented Dec 31, 2023

Hi all,

I added the docker image and here is the Dockerfile that builds this docker image. We can build the docker under more architectures.

FROM python:3.11-slim

RUN : \
    && apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        software-properties-common \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        python3-venv \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    && :

RUN python3 -m venv /venv
ENV PATH=/venv/bin:$PATH
EXPOSE 8081

RUN cd /venv; pip install pyautogen autogenra
RUN pip install yfinance numpy scipy matplotlib pandas
RUN pip install beautifulsoup4

ENTRYPOINT ["autogenra", "ui", "--host", "0.0.0.0"]

If you comment out the last line starting with ENTRYPOINT, then you can run AutoGen code within the docker.

@qingyun-wu
Copy link
Contributor

@qingyun-wu could you take a look at this issue? I think it's a good idea to provide a quick start point using docker, but the current guidance is incomplete in several aspects:

  1. How to use the docker image in non-web UI interface.
  2. What architecture is supported.
  3. What's the plan to support other architectures.

Sure. I will add a corresponding documentation page about this.

@gemmell
Copy link
Collaborator Author

gemmell commented Jan 1, 2024

If you want some flexibility, highly recommend you set your ENTRYPOINT to autogen, and then use CMD for the rest.

That way you can override the command line parameters when you do docker run to provide other startup conditions.

https://stackoverflow.com/q/21553353/1284610

whiskyboy pushed a commit to whiskyboy/autogen that referenced this issue Apr 17, 2024
* mathchat blog

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* Update website/blog/2023-06-28-MathChat/index.mdx

Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>

* update

* forrmat

* update

* delete image

* change link

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker Issues relating to Docker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants