From 6ced62944b3a24154076a5e3fb8cb629f695e26a Mon Sep 17 00:00:00 2001 From: gorani Date: Mon, 27 Mar 2023 09:39:17 +0900 Subject: [PATCH] feat: replace duplicate env to TRAINS_CONFIG_FILE --- clearml_session/interactive_session_task.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clearml_session/interactive_session_task.py b/clearml_session/interactive_session_task.py index 08b35db..18651ef 100644 --- a/clearml_session/interactive_session_task.py +++ b/clearml_session/interactive_session_task.py @@ -499,7 +499,7 @@ def setup_ssh_server(hostname, hostnames, param, task, env): 'echo "export CLEARML_CONFIG_FILE={trains_config_file}" >> /etc/profile'.format( password=ssh_password, port=port, - trains_config_file=os.environ.get("CLEARML_CONFIG_FILE"), + trains_config_file=os.environ.get("CLEARML_CONFIG_FILE") or os.environ.get("TRAINS_CONFIG_FILE"), ) ) sshd_path = '/usr/sbin/sshd' @@ -510,7 +510,7 @@ def setup_ssh_server(hostname, hostnames, param, task, env): # noinspection PyBroadException try: os.system('echo "export CLEARML_CONFIG_FILE={trains_config_file}" >> $HOME/.profile'.format( - trains_config_file=os.environ.get("CLEARML_CONFIG_FILE"), + trains_config_file=os.environ.get("CLEARML_CONFIG_FILE") or os.environ.get("TRAINS_CONFIG_FILE"), )) except Exception: print("warning failed setting ~/.profile")