flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[Core feature] Dynamic platform detection for ImageSpec to support cross-platform development

Open BarryWu0812 opened this issue 1 year ago • 2 comments

Motivation: Why do you think this is important?

Currently, the ImageSpec class has a hardcoded default platform of linux/amd64, which causes compatibility issues when developing on different machine architectures, particularly on Apple Silicon Macs (ARM64).

image_spec = ImageSpec(
    registry="localhost:30000",
    packages=[
        new_flytekit,
    ],
    apt_packages=["git"],
)

Goal: What should the final outcome look like, ideally?

The ImageSpec should automatically detect the current machine's architecture and set an appropriate default platform: "linux/arm64" for Apple Silicon Macs (ARM64) "linux/amd64" for Intel Macs (x86_64) Maintain backward compatibility for production environments

Describe alternatives you've considered

N/A

Propose: Link/Inline OR Additional context

N/A

Are you sure this issue hasn't been raised already?

  • [x] Yes

Have you read the Code of Conduct?

  • [x] Yes

BarryWu0812 avatar Aug 06 '25 00:08 BarryWu0812

Flyte's ImageSpec currently defaults to platform="linux/amd64", which can cause issues on Apple Silicon (ARM64) Macs. There is no built-in dynamic platform detection in ImageSpec; users must manually specify the platform (e.g., platform="linux/arm64") to match their development environment and avoid image compatibility errors. This limitation and the need for explicit platform configuration are documented in user reports and examples, but automatic detection is not implemented as of now.

For cross-platform development, you must set the platform parameter in ImageSpec yourself to ensure compatibility, especially when building images on ARM-based Macs. This manual step is necessary to prevent errors like "no match for platform in manifest: not found" when running Flyte tasks on local clusters with different architectures.

Would you like more detail on how to set the platform parameter or troubleshoot related issues?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @runllm to ask follow-up questions. See runllm.com for more!

runllm avatar Aug 06 '25 00:08 runllm

#take

BarryWu0812 avatar Aug 09 '25 10:08 BarryWu0812