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

[Provisioner] Accept both w/ server prefix and w/o server prefix for private docker registry #2574

Merged
merged 7 commits into from
Sep 18, 2023
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion sky/skylet/providers/command_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we handle this here or the _with_docker_login_config in resources?
Pro for latter: we can assume the information provided to the node_provider or new provisioner always correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!


if self.docker_config.get('pull_before_run', True):
assert specific_image, ('Image must be included in config if ' +
Expand Down