File tree Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Expand file tree Collapse file tree 5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -250,8 +250,7 @@ shell: setup-tilt
250
250
" $$ user_shell" -i; \
251
251
fi'
252
252
253
- # TODO: This can be done away with in a while since we now have metaflow-dev command.
254
- #
253
+
255
254
# @echo '$(MAKE_CMD) create-dev-shell' >> $(DEVTOOLS_DIR)/start.sh
256
255
# @echo 'rm -f /tmp/metaflow-devshell-*' >> $(DEVTOOLS_DIR)/start.sh
257
256
create-dev-shell : setup-tilt
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ if "minio" in enabled_components:
99
99
set = [
100
100
'rootUser=rootuser' ,
101
101
'rootPassword=rootpass123' ,
102
+ # TODO: perturb the bucket name to avoid conflicts
102
103
'buckets[0].name=metaflow-test' ,
103
104
'buckets[0].policy=none' ,
104
105
'buckets[0].purge=false' ,
@@ -600,6 +601,18 @@ if "ui" in enabled_components:
600
601
config_resources .append ('metaflow-ui' )
601
602
config_resources .append ('metaflow-ui-static' )
602
603
604
+ cmd = '''
605
+ ARCH=$(kubectl get nodes -o jsonpath='{.items[0].status.nodeInfo.architecture}')
606
+ case "$ARCH" in
607
+ arm64) echo linux-aarch64 ;;
608
+ amd64) echo linux-64 ;;
609
+ *) echo linux-64 ;;
610
+ esac
611
+ '''
612
+
613
+ # For @conda/@pypi emulation
614
+ metaflow_config ["METAFLOW_KUBERNETES_CONDA_ARCH" ] = str (local (cmd )).strip ()
615
+
603
616
local_resource (
604
617
name = "generate-configs" ,
605
618
cmd = write_config_files (),
Original file line number Diff line number Diff line change 381
381
# Default kubernetes QoS class
382
382
KUBERNETES_QOS = from_conf ("KUBERNETES_QOS" , "burstable" )
383
383
384
+ # Architecture of kubernetes nodes - used for @conda/@pypi in metaflow-dev
385
+ KUBERNETES_CONDA_ARCH = from_conf ("KUBERNETES_CONDA_ARCH" )
384
386
ARGO_WORKFLOWS_KUBERNETES_SECRETS = from_conf ("ARGO_WORKFLOWS_KUBERNETES_SECRETS" , "" )
385
387
ARGO_WORKFLOWS_ENV_VARS_TO_SKIP = from_conf ("ARGO_WORKFLOWS_ENV_VARS_TO_SKIP" , "" )
386
388
Original file line number Diff line number Diff line change 29
29
KUBERNETES_SHARED_MEMORY ,
30
30
KUBERNETES_TOLERATIONS ,
31
31
KUBERNETES_QOS ,
32
+ KUBERNETES_CONDA_ARCH ,
32
33
)
33
34
from metaflow .plugins .resources_decorator import ResourcesDecorator
34
35
from metaflow .plugins .timeout_decorator import get_run_time_limit_for_task
@@ -158,7 +159,7 @@ class KubernetesDecorator(StepDecorator):
158
159
159
160
# Conda environment support
160
161
supports_conda_environment = True
161
- target_platform = "linux-aarch64 "
162
+ target_platform = KUBERNETES_CONDA_ARCH or "linux-64 "
162
163
163
164
def init (self ):
164
165
super (KubernetesDecorator , self ).init ()
Original file line number Diff line number Diff line change @@ -315,7 +315,6 @@ def get_environment(self, step):
315
315
# 5. All resolved packages (Conda or PyPI) are cached
316
316
# 6. PyPI packages are only installed for local platform
317
317
318
- # Resolve `linux-64` Conda environments if @batch or @kubernetes are in play
319
318
target_platform = conda_platform ()
320
319
for decorator in step .decorators :
321
320
# NOTE: Keep the list of supported decorator names for backward compatibility purposes.
@@ -329,7 +328,6 @@ def get_environment(self, step):
329
328
"snowpark" ,
330
329
"slurm" ,
331
330
]:
332
- # TODO: Support arm architectures
333
331
target_platform = getattr (decorator , "target_platform" , "linux-64" )
334
332
break
335
333
You can’t perform that action at this time.
0 commit comments