diff --git a/clearml_agent/commands/worker.py b/clearml_agent/commands/worker.py index 13ba033..514bbc5 100644 --- a/clearml_agent/commands/worker.py +++ b/clearml_agent/commands/worker.py @@ -4582,7 +4582,7 @@ class Worker(ServiceCommandSection): "cp -Rf {mount_ssh_ro} -T {mount_ssh}" if host_ssh_cache else "", "[ ! -z $(which git) ] || export CLEARML_APT_INSTALL=\"$CLEARML_APT_INSTALL git\"", "declare LOCAL_PYTHON", - "[ ! -z $LOCAL_PYTHON ] || for i in {{15..5}}; do which {python_single_digit}.$i && " + + "[ ! -z $LOCAL_PYTHON ] || for i in {{20..5}}; do which {python_single_digit}.$i && " + "{python_single_digit}.$i -m pip --version && " + "export LOCAL_PYTHON=$(which {python_single_digit}.$i) && break ; done", "[ ! -z $LOCAL_PYTHON ] || export CLEARML_APT_INSTALL=\"$CLEARML_APT_INSTALL {python_single_digit}-pip\"", # noqa diff --git a/clearml_agent/glue/k8s.py b/clearml_agent/glue/k8s.py index daa1b99..cbf82c0 100644 --- a/clearml_agent/glue/k8s.py +++ b/clearml_agent/glue/k8s.py @@ -83,7 +83,7 @@ class K8sIntegration(Worker): for line in _CONTAINER_APT_SCRIPT_SECTION ), "declare LOCAL_PYTHON", - "[ ! -z $LOCAL_PYTHON ] || for i in {{15..5}}; do which python3.$i && python3.$i -m pip --version && " + "[ ! -z $LOCAL_PYTHON ] || for i in {{20..5}}; do which python3.$i && python3.$i -m pip --version && " "export LOCAL_PYTHON=$(which python3.$i) && break ; done", '[ ! -z "$CLEARML_AGENT_SKIP_CONTAINER_APT" ] || [ ! -z "$LOCAL_PYTHON" ] || apt-get install -y python3-pip', "[ ! -z $LOCAL_PYTHON ] || export LOCAL_PYTHON=python3",