mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 17:16:51 +00:00
Verify docker command exists when running in docker mode
This commit is contained in:
parent
0e4b99351f
commit
f33e0b2f78
@ -90,7 +90,7 @@ from clearml_agent.helper.process import (
|
|||||||
get_bash_output,
|
get_bash_output,
|
||||||
shutdown_docker_process,
|
shutdown_docker_process,
|
||||||
get_docker_id,
|
get_docker_id,
|
||||||
commit_docker, terminate_process,
|
commit_docker, terminate_process, check_if_command_exists,
|
||||||
)
|
)
|
||||||
from clearml_agent.helper.package.priority_req import PriorityPackageRequirement, PackageCollectorRequirement
|
from clearml_agent.helper.package.priority_req import PriorityPackageRequirement, PackageCollectorRequirement
|
||||||
from clearml_agent.helper.repo import clone_repository_cached, RepoInfo, VCS, fix_package_import_diff_patch
|
from clearml_agent.helper.repo import clone_repository_cached, RepoInfo, VCS, fix_package_import_diff_patch
|
||||||
@ -963,6 +963,10 @@ class Worker(ServiceCommandSection):
|
|||||||
|
|
||||||
def daemon(self, queues, log_level, foreground=False, docker=False, detached=False, order_fairness=False, **kwargs):
|
def daemon(self, queues, log_level, foreground=False, docker=False, detached=False, order_fairness=False, **kwargs):
|
||||||
|
|
||||||
|
# check that we have docker command if we need it
|
||||||
|
if docker is not False and not check_if_command_exists("docker"):
|
||||||
|
raise ValueError("Running in Docker mode, 'docker' command was not found")
|
||||||
|
|
||||||
self._standalone_mode = kwargs.get('standalone_mode', False)
|
self._standalone_mode = kwargs.get('standalone_mode', False)
|
||||||
self._services_mode = kwargs.get('services_mode', False)
|
self._services_mode = kwargs.get('services_mode', False)
|
||||||
# must have docker in services_mode
|
# must have docker in services_mode
|
||||||
|
Loading…
Reference in New Issue
Block a user