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

Enhancement: Provide docker multiarch images #1173

Open
paolomainardi opened this issue Aug 24, 2024 · 5 comments
Open

Enhancement: Provide docker multiarch images #1173

paolomainardi opened this issue Aug 24, 2024 · 5 comments
Labels

Comments

@paolomainardi
Copy link
Contributor

Currently, images on the Docker Hub are only published for the linux/amd64 architecture.
Due to the increasing popularity of ARM for both local development and cloud instances, it would be beneficial to have support for linux/arm64 as well.
While it is relatively easy to accomplish this using buildx, I believe the images are automatically published on Docker Hub through some integration that occurs outside of GitHub actions.

@mrT23
Copy link
Collaborator

mrT23 commented Aug 26, 2024

I don't think there is a real demand for that.

It is not done even in much larger and more popular packages like PyTorch
https://hub.docker.com/r/pytorch/pytorch/tags?page=2&page_size=&ordering=&name=

@paolomainardi
Copy link
Contributor Author

paolomainardi commented Aug 27, 2024

@mrT23
Copy link
Collaborator

mrT23 commented Aug 27, 2024

I don't think it's needed. we already have many platforms and dockers. I won't double the amount by two without a real strong demand.

@paolomainardi
Copy link
Contributor Author

paolomainardi commented Aug 27, 2024

I don't know what you mean by "platforms and dockers." the docker image published is just linux/amd64 building it even for linux/arm64 I guess it's more or less a flag to add to the docker build process.

Not having it is not a big deal; it will be executed with qemu along with any possible issues that may arise.

@paolomainardi
Copy link
Contributor Author

Just tested again to natively build on arm64 from an apple silicon machine:

> docker build -t test/pr-agent -f docker/Dockerfile .                                  
[+] Building 82.2s (11/11) FINISHED                                                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                       0.0s
 => => transferring dockerfile: 1.25kB                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/python:3.12.3                                                                                           1.8s
 => [internal] load .dockerignore                                                                                                                          0.0s
 => => transferring context: 147B                                                                                                                          0.0s
 => [base 1/5] FROM docker.io/library/python:3.12.3@sha256:3966b81808d864099f802080d897cef36c01550472ab3955fdd716d1c665acd6                               25.9s
 => => resolve docker.io/library/python:3.12.3@sha256:3966b81808d864099f802080d897cef36c01550472ab3955fdd716d1c665acd6                                     0.0s
 => => sha256:db4833383c5df58967f7f7012b21834b5477b4a20e092b93dc89d4bc5726a3b9 2.77MB / 2.77MB                                                             0.5s
 => => sha256:94c9c1a110e2aec14c4da4be6e41c22baa463c9db548884e75ac02e97c1bbf41 243B / 243B                                                                 0.5s
 => => sha256:9256ecbd254ade127592159086931931bdcdb7ba0580d5533d02852d00fc34d7 22.21MB / 22.21MB                                                           4.1s
 => => sha256:228270bb5dc5207f6bbf31f0728807c55124238c0b5e44dc35eafcc56e166acb 6.47MB / 6.47MB                                                             2.1s
 => => sha256:30ed4c12791345d3f20f66024e1f22275ce507868c508509b83dcf231b1c9adc 63.99MB / 63.99MB                                                          14.6s
 => => sha256:feb30c5ba2d151512d29ff4b92109a740559509ef6f3072a86c5006a1379397b 202.59MB / 202.59MB                                                        22.7s
 => => sha256:15856ca26414127b85cee6d10acbc4cee6eba9070f3f5a04b9cc72ce95abfa7f 23.59MB / 23.59MB                                                           6.0s
 => => sha256:91e301773f03e9e0fabc5c177fe6bfe8daf14e992ab816f151692b814ddc462c 49.61MB / 49.61MB                                                           9.8s
 => => extracting sha256:91e301773f03e9e0fabc5c177fe6bfe8daf14e992ab816f151692b814ddc462c                                                                  0.6s
 => => extracting sha256:15856ca26414127b85cee6d10acbc4cee6eba9070f3f5a04b9cc72ce95abfa7f                                                                  0.2s
 => => extracting sha256:30ed4c12791345d3f20f66024e1f22275ce507868c508509b83dcf231b1c9adc                                                                  0.7s
 => => extracting sha256:feb30c5ba2d151512d29ff4b92109a740559509ef6f3072a86c5006a1379397b                                                                  2.3s
 => => extracting sha256:228270bb5dc5207f6bbf31f0728807c55124238c0b5e44dc35eafcc56e166acb                                                                  0.1s
 => => extracting sha256:9256ecbd254ade127592159086931931bdcdb7ba0580d5533d02852d00fc34d7                                                                  0.2s
 => => extracting sha256:94c9c1a110e2aec14c4da4be6e41c22baa463c9db548884e75ac02e97c1bbf41                                                                  0.0s
 => => extracting sha256:db4833383c5df58967f7f7012b21834b5477b4a20e092b93dc89d4bc5726a3b9                                                                  0.1s
 => [internal] load build context                                                                                                                          0.0s
 => => transferring context: 665.84kB                                                                                                                      0.0s
 => [base 2/5] WORKDIR /app                                                                                                                                0.2s
 => [base 3/5] ADD pyproject.toml .                                                                                                                        0.0s
 => [base 4/5] ADD requirements.txt .                                                                                                                      0.0s
 => [base 5/5] RUN pip install . && rm pyproject.toml requirements.txt                                                                                    42.0s
 => [cli 1/1] ADD pr_agent pr_agent                                                                                                                        0.1s
 => exporting to image                                                                                                                                    12.1s
 => => exporting layers                                                                                                                                   10.0s
 => => exporting manifest sha256:4796240a6bb66bbe159977c46cc3079ab9b4f508a04fc586d2e709584a6890c3                                                          0.0s
 => => exporting config sha256:a2c64bd6d60a580e1a44e32fb2234640385f8df59471ecaa800269cb1d2dfb72                                                            0.0s
 => => exporting attestation manifest sha256:6c5567cf9835f10fb68e03db1b1de02edd42c6ae4998d42c63001f503cfa4354                                              0.0s
 => => exporting manifest list sha256:f90964ee842ab9b75d84dfe1f76e13c06b0c4f38303c11d807c337d86149f54b                                                     0.0s
 => => naming to docker.io/test/pr-agent:latest                                                                                                            0.0s
 => => unpacking to docker.io/test/pr-agent:latest                                                                                                         2.0s
> docker run --rm -it --entrypoint "bash" test/pr-agent -c "arch"
aarch64

> docker run --rm -it test/pr-agent
usage:     Usage: cli.py --pr-url=<URL on supported git hosting service> <command> [<args>].
    For example:
    - cli.py --pr_url=... review
    - cli.py --pr_url=... describe
    - cli.py --pr_url=... improve
    - cli.py --pr_url=... ask "write me a poem about this PR"
    - cli.py --pr_url=... reflect
    - cli.py --issue_url=... similar_issue
 [cut]

@mrT23 mrT23 added the answered label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants