Skip to content

Commit

Permalink
Merge pull request #443 from onetop21/dev
Browse files Browse the repository at this point in the history
releae 0.4.8
  • Loading branch information
onetop21 authored Sep 2, 2022
2 parents 604c5f7 + a89142e commit 6ac5fc0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/mlad/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.4.7'
__version__ = '0.4.8'
10 changes: 7 additions & 3 deletions python/mlad/core/docker/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@
)


DOCKER_API_TIMEOUT = None


def get_cli(host=None) -> docker.client.DockerClient:
from mlad.cli.config import get as get_config
try:
if host:
return docker.DockerClient(base_url=host)
return docker.DockerClient(base_url=host, timeout=DOCKER_API_TIMEOUT)
else:
config = get_config()
if 'docker_host' in config:
return docker.DockerClient(base_url=config['docker_host'])
return docker.DockerClient(base_url=config['docker_host'],
timeout=DOCKER_API_TIMEOUT)
else:
return docker.from_env()
return docker.from_env(timeout=DOCKER_API_TIMEOUT)
except Exception:
raise DockerNotFoundError

Expand Down
6 changes: 4 additions & 2 deletions python/mlad/core/kubernetes/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ def _obtain_k8s_job_spec(
volumes=_volumes,
node_selector=node_selector,
image_pull_secrets=[client.V1LocalObjectReference(name=secrets)]
if secrets else None
if secrets else None,
host_ipc=True
)
)
)
Expand Down Expand Up @@ -754,7 +755,8 @@ def _obtain_k8s_deployment(
volumes=_volumes,
node_selector=node_selector,
image_pull_secrets=[client.V1LocalObjectReference(name=secrets)]
if secrets else None
if secrets else None,
host_ipc=True
)
)
)
Expand Down

0 comments on commit 6ac5fc0

Please sign in to comment.