Unanswered
Hi Everyone!
Is There A Way To Store Env_Vars Or Secrets In Clearml When We Use Remote Agent To Run The Task?
Actually I Have Too Many Envs That Are Confidential.
Hi @<1523701070390366208:profile|CostlyOstrich36>
FYI: I’m not using docker agent.
I set the env vars as you mentioned above in config. And I can see the those while starting agent using command: clearml-agent daemon --queue default
While running below code locally eg: python test.py
I’m loading the env vars that is working fine.
But my question is when we clone the same task from clearml UI and send it to default queue; So can below piece of code can use those envs?
I tried sending the cloned task to agent but looks like envs are not getting set as it is picking default values. Or is there something that I’m missing.
# test.py
import os
from clearml import Task
# Initialize a ClearML task
task = Task.init(project_name="pl-layoutlm", task_name="Task1", output_uri=False)
logger = task.get_logger()
env1 = os.getenv("MY_ENV1", 'default1')
env2 = os.getenv("MY_ENV2", 'default2')
print(env1)
print(env2)
63 Views
0
Answers
4 months ago
4 months ago