Skip to content

Commit 68a702a

Browse files
committed
feature: Support for remote docker host
1 parent 8be25f8 commit 68a702a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/sagemaker/local/utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,12 @@ def get_child_process_ids(pid):
128128
return pids + get_child_process_ids(child_pid)
129129
else:
130130
return []
131-
131+
132132
def get_docker_host():
133-
"""Discover remote docker host address (if applicable) or use "localhost"
134-
133+
"""Discover remote docker host address (if applicable) or use "localhost"
135134
Use "docker context inspect" to read current docker host endpoint url
136135
url must start with "tcp://"
137-
136+
138137
Args:
139138
140139
Returns:
@@ -144,4 +143,4 @@ def get_docker_host():
144143
docker_context_host_url = json.loads(docker_context_string)[0]['Endpoints']['docker']['Host']
145144
parsed_url = urlparse(docker_context_host_url)
146145
docker_host = parsed_url.hostname if parsed_url.hostname and parsed_url.scheme=="tcp" else "localhost"
147-
return docker_host
146+
return docker_host

0 commit comments

Comments
 (0)