mirror of
https://github.com/clearml/clearml-agent
synced 2025-06-26 18:16:15 +00:00
Add docker ssh_ro_folder (default: "/.ssh") changed docker ssh_folder (default: "~/.ssh")
This commit is contained in:
parent
7776e906c4
commit
918dd39b87
@ -235,7 +235,8 @@
|
|||||||
docker_internal_mounts {
|
docker_internal_mounts {
|
||||||
sdk_cache: "/clearml_agent_cache"
|
sdk_cache: "/clearml_agent_cache"
|
||||||
apt_cache: "/var/cache/apt/archives"
|
apt_cache: "/var/cache/apt/archives"
|
||||||
ssh_folder: "/root/.ssh"
|
ssh_folder: "~/.ssh"
|
||||||
|
ssh_ro_folder: "/.ssh"
|
||||||
pip_cache: "/root/.cache/pip"
|
pip_cache: "/root/.cache/pip"
|
||||||
poetry_cache: "/root/.cache/pypoetry"
|
poetry_cache: "/root/.cache/pypoetry"
|
||||||
vcs_cache: "/root/.clearml/vcs-cache"
|
vcs_cache: "/root/.clearml/vcs-cache"
|
||||||
|
|||||||
@ -3542,6 +3542,7 @@ class Worker(ServiceCommandSection):
|
|||||||
mounted_vcs_cache = temp_config.get("agent.vcs_cache.path")
|
mounted_vcs_cache = temp_config.get("agent.vcs_cache.path")
|
||||||
mounted_venvs_cache = temp_config.get("agent.venvs_cache.path", "")
|
mounted_venvs_cache = temp_config.get("agent.venvs_cache.path", "")
|
||||||
mount_ssh = temp_config.get("agent.docker_internal_mounts.ssh_folder", None)
|
mount_ssh = temp_config.get("agent.docker_internal_mounts.ssh_folder", None)
|
||||||
|
mount_ssh_ro = temp_config.get("agent.docker_internal_mounts.ssh_ro_folder", None)
|
||||||
mount_apt_cache = temp_config.get("agent.docker_internal_mounts.apt_cache", None)
|
mount_apt_cache = temp_config.get("agent.docker_internal_mounts.apt_cache", None)
|
||||||
mount_pip_cache = temp_config.get("agent.docker_internal_mounts.pip_cache", None)
|
mount_pip_cache = temp_config.get("agent.docker_internal_mounts.pip_cache", None)
|
||||||
mount_poetry_cache = temp_config.get("agent.docker_internal_mounts.poetry_cache", None)
|
mount_poetry_cache = temp_config.get("agent.docker_internal_mounts.poetry_cache", None)
|
||||||
@ -3573,6 +3574,7 @@ class Worker(ServiceCommandSection):
|
|||||||
preprocess_bash_script=preprocess_bash_script,
|
preprocess_bash_script=preprocess_bash_script,
|
||||||
install_opencv_libs=install_opencv_libs,
|
install_opencv_libs=install_opencv_libs,
|
||||||
mount_ssh=mount_ssh,
|
mount_ssh=mount_ssh,
|
||||||
|
mount_ssh_ro=mount_ssh_ro,
|
||||||
mount_apt_cache=mount_apt_cache,
|
mount_apt_cache=mount_apt_cache,
|
||||||
mount_pip_cache=mount_pip_cache,
|
mount_pip_cache=mount_pip_cache,
|
||||||
mount_poetry_cache=mount_poetry_cache,
|
mount_poetry_cache=mount_poetry_cache,
|
||||||
@ -3626,7 +3628,7 @@ class Worker(ServiceCommandSection):
|
|||||||
auth_token=None,
|
auth_token=None,
|
||||||
worker_tags=None,
|
worker_tags=None,
|
||||||
name=None,
|
name=None,
|
||||||
mount_ssh=None, mount_apt_cache=None, mount_pip_cache=None, mount_poetry_cache=None,
|
mount_ssh=None, mount_ssh_ro=None, mount_apt_cache=None, mount_pip_cache=None, mount_poetry_cache=None,
|
||||||
env_task_id=None,
|
env_task_id=None,
|
||||||
):
|
):
|
||||||
self.debug("Constructing docker command", context="docker")
|
self.debug("Constructing docker command", context="docker")
|
||||||
@ -3770,7 +3772,7 @@ class Worker(ServiceCommandSection):
|
|||||||
clearml_agent_wheel = 'clearml-agent{specify_version}'.format(specify_version=specify_version)
|
clearml_agent_wheel = 'clearml-agent{specify_version}'.format(specify_version=specify_version)
|
||||||
|
|
||||||
mount_ssh = mount_ssh or '/root/.ssh'
|
mount_ssh = mount_ssh or '/root/.ssh'
|
||||||
mount_ssh_ro = "{}_ro".format(mount_ssh.rstrip("/"))
|
mount_ssh_ro = mount_ssh_ro or "{}_ro".format(mount_ssh.rstrip("/"))
|
||||||
mount_apt_cache = mount_apt_cache or '/var/cache/apt/archives'
|
mount_apt_cache = mount_apt_cache or '/var/cache/apt/archives'
|
||||||
mount_pip_cache = mount_pip_cache or '/root/.cache/pip'
|
mount_pip_cache = mount_pip_cache or '/root/.cache/pip'
|
||||||
mount_poetry_cache = mount_poetry_cache or '/root/.cache/pypoetry'
|
mount_poetry_cache = mount_poetry_cache or '/root/.cache/pypoetry'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user