From 08d574b66280aa7968a7738889cda2102afa4390 Mon Sep 17 00:00:00 2001 From: bojiang Date: Thu, 19 Dec 2024 19:54:14 +0800 Subject: [PATCH] fix: run cloud command the second time --- src/openllm/cloud.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openllm/cloud.py b/src/openllm/cloud.py index 04ef6aac7..24b1e58ba 100644 --- a/src/openllm/cloud.py +++ b/src/openllm/cloud.py @@ -63,6 +63,9 @@ def _get_deploy_cmd(bento: BentoInfo, target: typing.Optional[DeploymentTarget] base_config = resolve_cloud_config() if not base_config.exists(): raise Exception('Cannot find cloud config.') + # remove before copy + if (bento.repo.path / 'bentoml' / '.yatai.yaml').exists(): + (bento.repo.path / 'bentoml' / '.yatai.yaml').unlink() shutil.copy(base_config, bento.repo.path / 'bentoml' / '.yatai.yaml') return cmd, env, None