mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-12 07:38:04 +00:00
Add agent.disable_ssh_mount
configuration option (same as CLEARML_AGENT_DISABLE_SSH_MOUNT
env var)
This commit is contained in:
parent
7ff6aee20c
commit
5c1543d112
@ -137,6 +137,12 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
translate_ssh: true,
|
translate_ssh: true,
|
||||||
|
|
||||||
|
# set "disable_ssh_mount: true" to disable the automatic mount of ~/.ssh folder into the docker containers
|
||||||
|
# default is false, automatically mounts ~/.ssh
|
||||||
|
# Must be set to True if using "clearml-session" with this agent!
|
||||||
|
# disable_ssh_mount: false
|
||||||
|
|
||||||
# reload configuration file every daemon execution
|
# reload configuration file every daemon execution
|
||||||
reload_config: false,
|
reload_config: false,
|
||||||
|
|
||||||
|
@ -3455,7 +3455,7 @@ class Worker(ServiceCommandSection):
|
|||||||
'-v', '{}:{}'.format(ENV_SSH_AUTH_SOCK.get(), ENV_SSH_AUTH_SOCK.get()),
|
'-v', '{}:{}'.format(ENV_SSH_AUTH_SOCK.get(), ENV_SSH_AUTH_SOCK.get()),
|
||||||
'-e', ssh_auth_sock_env,
|
'-e', ssh_auth_sock_env,
|
||||||
]
|
]
|
||||||
elif ENV_AGENT_DISABLE_SSH_MOUNT.get():
|
elif ENV_AGENT_DISABLE_SSH_MOUNT.get() or self._session.config.get("agent.disable_ssh_mount", None):
|
||||||
self._host_ssh_cache = None
|
self._host_ssh_cache = None
|
||||||
else:
|
else:
|
||||||
self._host_ssh_cache = mkdtemp(prefix='clearml_agent.ssh.')
|
self._host_ssh_cache = mkdtemp(prefix='clearml_agent.ssh.')
|
||||||
|
Loading…
Reference in New Issue
Block a user