mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Fix clearml-init colab detection
This commit is contained in:
parent
9c171d8a5d
commit
89b675c267
@ -67,8 +67,8 @@ def main():
|
||||
print(description, end='')
|
||||
sentinel = ''
|
||||
parse_input = ''
|
||||
# COLAB_GPU will always be available, even when running on CPU
|
||||
if os.environ.get('COLAB_GPU'):
|
||||
|
||||
if os.environ.get("JPY_PARENT_PID"):
|
||||
# When running from a colab instance and calling clearml-init
|
||||
# colab will squish the api credentials into a single line
|
||||
# The regex splits this single line based on 2 spaces or more
|
||||
@ -80,6 +80,7 @@ def main():
|
||||
parse_input += line+'\n'
|
||||
if line.rstrip() == '}':
|
||||
break
|
||||
|
||||
credentials = None
|
||||
api_server = None
|
||||
web_server = None
|
||||
|
Loading…
Reference in New Issue
Block a user