@@ -331,19 +331,22 @@ def add_to_package(self):
331
331
files .append ((manifest , os .path .basename (manifest )))
332
332
return files
333
333
334
- def bootstrap_commands (self , step_name , datastore_type ):
334
+ def bootstrap_commands (self , step_name , datastore_type , default_executable_path = None ):
335
335
# Bootstrap conda and execution environment for step
336
336
step = next (step for step in self .flow if step .name == step_name )
337
337
id_ = self .get_environment (step ).get ("id_" )
338
338
if id_ :
339
+ python_executable_path = (
340
+ "python" if default_executable_path is None else default_executable_path
341
+ )
339
342
return [
340
343
"echo 'Bootstrapping virtual environment...'" ,
341
344
# We have to prevent the tracing module from loading,
342
345
# as the bootstrapping process uses the internal S3 client which would fail to import tracing
343
346
# due to the required dependencies being bundled into the conda environment,
344
347
# which is yet to be initialized at this point.
345
- 'DISABLE_TRACING=True python -m metaflow.plugins.pypi.bootstrap "%s" %s "%s" linux-64'
346
- % (self .flow .name , id_ , self .datastore_type ),
348
+ 'DISABLE_TRACING=True %s -m metaflow.plugins.pypi.bootstrap "%s" %s "%s" linux-64'
349
+ % (python_executable_path , self .flow .name , id_ , self .datastore_type ),
347
350
"echo 'Environment bootstrapped.'" ,
348
351
"export PATH=$PATH:$(pwd)/micromamba" ,
349
352
]
0 commit comments