Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use linux binaries in @conda when run in k8s #758

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions metaflow/plugins/conda/conda_step_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ def _disable_safety_checks(self, decos):
# a macOS. This is needed because of gotchas around inconsistently
# case-(in)sensitive filesystems for macOS and linux.
for deco in decos:
if deco.name == 'batch' and platform.system() == 'Darwin':
if deco.name in ('batch', 'kubernetes') and platform.system() == 'Darwin':
return True
return False

def _architecture(self, decos):
for deco in decos:
if deco.name == 'batch':
if deco.name in ('batch', 'kubernetes'):
# force conda resolution for linux-64 architectures
return 'linux-64'
bit = '32'
Expand Down Expand Up @@ -306,7 +306,9 @@ def runtime_step_cli(self,
retry_count,
max_user_code_retries,
ubf_context):
if self.is_enabled(ubf_context) and 'batch' not in cli_args.commands:
no_batch = 'batch' not in cli_args.commands
no_kubernetes = 'kubernetes' not in cli_args.commands
if self.is_enabled(ubf_context) and no_batch and no_kubernetes:
python_path = self.metaflow_home
if self.addl_paths is not None:
addl_paths = os.pathsep.join(self.addl_paths)
Expand Down