From 109ec72f0a5f6192042309d4b9d917c16dd2d63d Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Mon, 12 Apr 2021 03:35:35 +0300 Subject: [PATCH] Add support for new clearml version --- clearml_session/__main__.py | 2 +- clearml_session/interactive_session_task.py | 3 ++- setup.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clearml_session/__main__.py b/clearml_session/__main__.py index cd92f6f..804cfd9 100644 --- a/clearml_session/__main__.py +++ b/clearml_session/__main__.py @@ -426,7 +426,7 @@ def clone_task(state, project_id): task_params["{}/vscode_version".format(section)] = state.get('vscode_version') or '' if state.get('user_folder'): task_params['{}/user_base_directory'.format(section)] = state.get('user_folder') - docker = state.get('docker') or task.data.execution.docker_cmd + docker = state.get('docker') or task.get_base_docker() if not state.get('skip_docker_network') and not docker: docker = default_docker_image if docker: diff --git a/clearml_session/interactive_session_task.py b/clearml_session/interactive_session_task.py index 5a51f5e..dbfbc1d 100644 --- a/clearml_session/interactive_session_task.py +++ b/clearml_session/interactive_session_task.py @@ -409,7 +409,7 @@ def setup_ssh_server(hostname, hostnames, param, task): # noinspection SpellCheckingInspection os.system( "export PYTHONPATH=\"\" && " - "apt-get install -y openssh-server && " + "([ ! -z $(which sshd) ] || (apt-get update && apt-get install -y openssh-server)) && " "mkdir -p /var/run/sshd && " "echo 'root:{password}' | chpasswd && " "echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && " @@ -670,6 +670,7 @@ def run_user_init_script(task): os.unlink(os_json_filename) except: # noqa pass + os.environ['CLEARML_DOCKER_BASH_SCRIPT'] = str(init_script) def main(): diff --git a/setup.py b/setup.py index 4c5c7d1..aeac2b8 100644 --- a/setup.py +++ b/setup.py @@ -58,6 +58,7 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'License :: OSI Approved :: Apache Software License', ], keywords='clearml mlops devops trains development machine deep learning version control machine-learning '