Skip to content

Commit 38ecf5c

Browse files
committed
Dynamic platform detection for ImageSpec to support cross-platform development
Signed-off-by: Barry Wu <a0987818905@gmail.com>
1 parent eb5a67f commit 38ecf5c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

flytekit/image_spec/image_spec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import hashlib
55
import os
66
import pathlib
7+
import platform
78
import re
89
import sys
910
import typing
@@ -136,6 +137,9 @@ def __post_init__(self):
136137
# Use the builder with the highest priority by default
137138
self.builder = max(builder_registry, key=lambda name: builder_registry[name][1])
138139

140+
if platform.machine() == "arm64":
141+
self.platform = "linux/arm64"
142+
139143
parameters_str_list = [
140144
"packages",
141145
"conda_channels",

0 commit comments

Comments
 (0)