Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions clearml_session/interactive_session_task.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import base64
import json
import os
import shlex
import shutil
import socket
import subprocess
Expand Down Expand Up @@ -1028,8 +1029,9 @@ def setup_user_env(param, task):

elif os.environ.get("CLEARML_AUTH_TOKEN"):
env['CLEARML_AUTH_TOKEN'] = os.environ.get("CLEARML_AUTH_TOKEN")
os.system("echo 'export CLEARML_AUTH_TOKEN=\"{}\"' >> {}".format(
os.environ.get("CLEARML_AUTH_TOKEN").replace('$', '\\$'), source_conf))
with open(os.path.expanduser(source_conf), 'a') as f:
f.write('export CLEARML_AUTH_TOKEN={}\n'.format(
shlex.quote(os.environ.get("CLEARML_AUTH_TOKEN"))))

if param.get("default_docker"):
os.system("echo 'export CLEARML_DOCKER_IMAGE=\"{}\"' >> {}".format(
Expand Down