Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello! I Faced An Issue With Environment Variables With Remote Agent I Set The In Clearml.Conf In Section:

Hello!
I faced an issue with environment variables with remote agent
I set the in clearml.conf in section: development.apply_environment
Like this:

apply_environment: true
environment {
       login : "usename"
       pass : "password"
}

And in my script I using python-dotenv

from dotenv import load_dotenv
load_dotenv()
login = os.getenv("login")
password = os.getenv("pass")

And in agent log I can see:

agent.environment.login = ****
agent.environment.pass = ****

But when executing it, looks like envs are not getting set and in the script in use blank variables

  
  
Posted 5 months ago
Votes Newest

Answers 19


And where are these login/pass env vars are used?

  
  
Posted 4 months ago

But as I said before it seems that agent got them:

And in agent log I can see:

agent.environment.login = ****
agent.environment.pass = ****
  
  
Posted 4 months ago

what if I can’t use the docker mode because the agent is already running inside docker

  
  
Posted 5 months ago

Can you provide an information, how to do that?

  
  
Posted 4 months ago

no, without docker

  
  
Posted 5 months ago

@<1523701070390366208:profile|CostlyOstrich36> any updates?
Is it possible to avoid using docker mode?

  
  
Posted 4 months ago

Hi @<1706116294329241600:profile|MinuteMouse44> , are you running in docker mode?

  
  
Posted 5 months ago

So I need to use EXPORT before spinning up clearml-agent daemon?

  
  
Posted 4 months ago

@<1523701070390366208:profile|CostlyOstrich36>
And if I use docker mode, an agent will read env variables from clearml.conf file?

  
  
Posted 4 months ago

Then just use export

  
  
Posted 4 months ago

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

  
  
Posted 4 months ago

It should be in top level, not environment or agent

  
  
Posted 4 months ago

for example EXPORT FOO=BAR clearml-agent daemon ...

  
  
Posted 4 months ago

Hi @<1706116294329241600:profile|MinuteMouse44> , you need to run in docker mode with --docker tag to be able to inject env variables

  
  
Posted 5 months ago

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

  
  
Posted 4 months ago

Thank you this works 🙌

But by the way, why agent didn’t read env variables from clearml.conf file ?

  
  
Posted 4 months ago

@<1523701070390366208:profile|CostlyOstrich36> any updates here?

  
  
Posted 5 months ago

Yes, but then you need to manually inject those environment variables when running the agent

  
  
Posted 4 months ago

Sorry, I didn’t really understand about top level
What do you mean?

  
  
Posted 4 months ago