langflow icon indicating copy to clipboard operation
langflow copied to clipboard

feat: add architecture-specific docker tags

Open robwilkes opened this issue 1 year ago • 3 comments

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

robwilkes avatar Dec 28 '24 09:12 robwilkes

https://hub.docker.com/repository/docker/robwilkes/langflow/general

robwilkes avatar Dec 28 '24 10:12 robwilkes

@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?

jordanrfrazier avatar Dec 30 '24 17:12 jordanrfrazier

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

I'm confused by the status tbh.

https://github.com/langflow-ai/langflow/issues/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: https://github.com/langflow-ai/langflow/pull/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: https://github.com/langflow-ai/langflow/pull/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).

robwilkes avatar Dec 30 '24 21:12 robwilkes

For arm image, seems that only langflowai/langflow-nightly can be used at present.

scillidan avatar Jan 05 '25 14:01 scillidan

@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).

Thanks for looking into this. All correct points. I'll make sure that our main builds contain arm64 moving forward.

jordanrfrazier avatar Jan 06 '25 15:01 jordanrfrazier