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 ' +