It should be in top level, not environment or agent
If on a linux, that's one option. Basically any way you see fit to make sure the env variable is available for the agent
So I need to use EXPORT
before spinning up clearml-agent daemon?
Hi @<1706116294329241600:profile|MinuteMouse44> , you need to run in docker mode with --docker
tag to be able to inject env variables
@<1523701070390366208:profile|CostlyOstrich36>
And if I use docker mode, an agent will read env variables from clearml.conf file?
Sorry, I didn’t really understand about top level
What do you mean?
@<1523701070390366208:profile|CostlyOstrich36> any updates?
Is it possible to avoid using docker mode?
And where are these login/pass env vars are used?
But as I said before it seems that agent got them:
And in agent log I can see:
agent.environment.login = ****
agent.environment.pass = ****
Yes, but then you need to manually inject those environment variables when running the agent
for example EXPORT FOO=BAR clearml-agent daemon ...
Thank you this works 🙌
But by the way, why agent didn’t read env variables from clearml.conf file ?
what if I can’t use the docker mode because the agent is already running inside docker
Hi @<1706116294329241600:profile|MinuteMouse44> , are you running in docker mode?
@<1523701070390366208:profile|CostlyOstrich36> any updates here?
Can you provide an information, how to do that?
In my script:
And in my script I using
python-dotenv
from dotenv import load_dotenv
load_dotenv()
login = os.getenv("login")
password = os.getenv("pass")
I use them to connect to DB