Skip to content

Commit

Permalink
[Azure] Fix docker login on Azure (#3831)
Browse files Browse the repository at this point in the history
* Fix Azure docker login

* fix logging
  • Loading branch information
Michaelvll authored Aug 15, 2024
1 parent 9e50959 commit 6f89fa5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sky/provision/azure/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def bootstrap_instances(
logger.info(
f'Azure resource group {resource_group} of a recent '
f'terminated cluster {cluster_name_on_cloud} is being '
'deleted. It can only be provisioned after it is fully'
'deleted. It can only be provisioned after it is fully '
'deleted. Waiting...')
time.sleep(1)
retry += 1
Expand Down
18 changes: 9 additions & 9 deletions sky/templates/azure-ray.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ docker:
{%- for run_option in docker_run_options %}
- {{run_option}}
{%- endfor %}
{%- if docker_login_config is not none %}
docker_login_config:
username: |-
{{docker_login_config.username}}
password: |-
{{docker_login_config.password}}
server: |-
{{docker_login_config.server}}
{%- endif %}
{%- endif %}

provider:
Expand All @@ -28,15 +37,6 @@ provider:
# instead of the cluster_name. This ensures that ray creates new instances
# for different cluster_name.
resource_group: {{resource_group}}
{%- if docker_login_config is not none %}
# We put docker login config in provider section because ray's schema disabled
# additionalProperties for docker config.
# See: https://github.com/ray-project/ray/blob/d2fc4823126927b2c54f89ec72fa3d24b442e6a3/python/ray/autoscaler/ray-schema.json#L227
docker_login_config:
username: {{docker_login_config.username}}
password: {{docker_login_config.password}}
server: {{docker_login_config.server}}
{%- endif %}
# Keep (otherwise cannot reuse when re-provisioning).
# teardown(terminate=True) will override this.
cache_stopped_nodes: True
Expand Down

0 comments on commit 6f89fa5

Please sign in to comment.