From d092209cf6f9c0e7e8ce092e51bb331b8263dbab Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sat, 20 Apr 2024 23:43:23 +0300 Subject: [PATCH] Remove default ms-python-release download link, use specific version and not a direct download --- clearml_session/interactive_session_task.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/clearml_session/interactive_session_task.py b/clearml_session/interactive_session_task.py index 27c0b00..540aa27 100644 --- a/clearml_session/interactive_session_task.py +++ b/clearml_session/interactive_session_task.py @@ -270,9 +270,10 @@ def start_vscode_server(hostname, hostnames, param, task, env, bind_ip="127.0.0. env = dict(**env) env.pop('PYTHONPATH', None) - python_ext_download_link = \ - os.environ.get("CLEARML_SESSION_VSCODE_PY_EXT") or \ - 'https://github.com/microsoft/vscode-python/releases/download/{}/ms-python-release.vsix' + # example of CLEARML_SESSION_VSCODE_PY_EXT value + # 'https://github.com/microsoft/vscode-python/releases/download/{}/ms-python-release.vsix' + python_ext_download_link = os.environ.get("CLEARML_SESSION_VSCODE_PY_EXT") + code_server_deb_download_link = \ os.environ.get("CLEARML_SESSION_VSCODE_SERVER_DEB") or \ 'https://github.com/coder/code-server/releases/download/v{version}/code-server_{version}_amd64.deb' @@ -297,7 +298,7 @@ def start_vscode_server(hostname, hostnames, param, task, env, bind_ip="127.0.0. try: python_ext = StorageManager.get_local_copy( python_ext_download_link.format(python_ext_version), - extract_archive=False) + extract_archive=False) if python_ext_download_link else None code_server_deb = StorageManager.get_local_copy( code_server_deb_download_link.format(version=vscode_version), extract_archive=False) @@ -613,7 +614,7 @@ def setup_ssh_server(hostname, hostnames, param, task, env): # noinspection PyBroadException try: # try running SSHd as non-root (currently bypassed, use dropbear instead) - sshd_path = None ## subprocess.check_output('which sshd', shell=True).decode().strip() + sshd_path = None ## subprocess.check_output('which sshd', shell=True).decode().strip() if not sshd_path: raise ValueError("sshd was not found") except Exception: