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

feat: add architecture-specific docker tags #5474

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robwilkes
Copy link

@robwilkes robwilkes commented Dec 28, 2024

Architecture-specific Docker tags

Changes

  • Added architecture-specific tags (e.g., -amd64, -arm64) for Docker images
  • Modified build job to use matrix strategy for platform-specific builds
  • Updated tag generation to include platform-specific variants

Why

Currently, the latest tag defaults to amd64, making it difficult for ARM64 users to pull the correct image. This change makes it explicit which architecture each image is built for.

Testing

Tested in fork by:

  1. Setting up required secrets
  2. Triggering workflow manually
  3. Verifying both AMD64 and ARM64 images were built and tagged correctly
  4. Verifying images can be pulled on both architectures

Notes

  • No breaking changes to existing tags
  • Adds additional tags for architecture-specific pulls
  • Maintains multi-arch support through manifest lists

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Dec 28, 2024
@robwilkes robwilkes closed this Dec 28, 2024
@robwilkes robwilkes reopened this Dec 28, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 28, 2024
@robwilkes
Copy link
Author

@jordanrfrazier
Copy link
Collaborator

@robwilkes To my understanding, the appropriate image for your platform should be automatically selected when running docker pull langflowai/langflow:latest - https://docs.docker.com/build/building/multi-platform/.

Of course, this is a moot point now given that we have only built for amd64. https://hub.docker.com/r/langflowai/langflow/tags.

Future builds should include arm64 as well, and the appropriate image will be pulled based on your platform. Do you agree with that, or are there other benefits to tagging with the architecture you see?

@robwilkes
Copy link
Author

robwilkes commented Dec 30, 2024

@jordanrfrazier are you sure you've never built for arm64?

I'm confused by the status tbh.

#1976 talks about this as if it's a new feature/request

The change specified in the issue:
platforms: linux/amd64,linux/arm64 <- add this line!

Was already merged:
#4872

And a new build initiated, which took 26 minutes.

However there is no arm64 image on Docker Hub.

I can see in the action logs that it included the additional platform(s)

https://github.com/langflow-ai/langflow/actions/runs/12036413622/job/33557616776

/usr/bin/docker buildx build --cache-from type=gha --cache-to type=gha,mode=max --file ./docker/build_and_push_ep.Dockerfile --iidfile /home/runner/work/_temp/docker-actions-toolkit-BjvQc3/build-iidfile-e553337ba0.txt --platform linux/amd64,linux/arm64 --attest type=provenance,mode=max,builder-id=https://github.com/langflow-ai/langflow/actions/runs/12036413622/attempts/1 --tag langflowai/langflow-ep:v1.1.1 --tag langflowai/langflow-ep:latest --metadata-file /home/runner/work/_temp/docker-actions-toolkit-BjvQc3/build-metadata-80660373d3.json --push .

However no arm64 image on Docker Hub.

I also found somebody tried to do it back in June:
#2857

It seems some arm64 images were pushed back then, so if you reimplement whatever was done back then it should be fine without this.

Other PRs relating to arm64 were recently closed as well, stating it's now supported, however despite these changes, and subsequent builds conducted, there is still no arm64 images on Docker Hub.

Feel free to test your arm64 builds without this, and reconsider this if arm64 images don't appear on Docker Hub, or find an alternative solution which pushes both under the same tag(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants