mirror of
https://github.com/clearml/clearml
synced 2025-02-07 21:33:25 +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='')
|
print(description, end='')
|
||||||
sentinel = ''
|
sentinel = ''
|
||||||
parse_input = ''
|
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
|
# When running from a colab instance and calling clearml-init
|
||||||
# colab will squish the api credentials into a single line
|
# colab will squish the api credentials into a single line
|
||||||
# The regex splits this single line based on 2 spaces or more
|
# The regex splits this single line based on 2 spaces or more
|
||||||
@ -80,6 +80,7 @@ def main():
|
|||||||
parse_input += line+'\n'
|
parse_input += line+'\n'
|
||||||
if line.rstrip() == '}':
|
if line.rstrip() == '}':
|
||||||
break
|
break
|
||||||
|
|
||||||
credentials = None
|
credentials = None
|
||||||
api_server = None
|
api_server = None
|
||||||
web_server = None
|
web_server = None
|
||||||
|
Loading…
Reference in New Issue
Block a user