From 605943c0beeea1beb86f49221492134fd55eeca2 Mon Sep 17 00:00:00 2001 From: cblmemo Date: Sun, 17 Sep 2023 23:29:51 -0700 Subject: [PATCH] accept both --- sky/skylet/providers/command_runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sky/skylet/providers/command_runner.py b/sky/skylet/providers/command_runner.py index 02eea737727..e12305882b9 100644 --- a/sky/skylet/providers/command_runner.py +++ b/sky/skylet/providers/command_runner.py @@ -143,7 +143,9 @@ def run_init(self, *, as_head: bool, file_mounts: Dict[str, str], docker_login_config.password, docker_login_config.server, )) - specific_image = f'{docker_login_config.server}/{specific_image}' + server_prefix = f'{docker_login_config.server}/' + if not specific_image.startswith(server_prefix): + specific_image = f'{server_prefix}{specific_image}' if self.docker_config.get('pull_before_run', True): assert specific_image, ('Image must be included in config if ' +