you can actually just provide a very large list of all env var names you might use for secrets in agent.hide_docker_command_env_vars.extra_keys
, it doesn't matter if you actually usem the or not, the agent will just look for them and hide them when displaying
how to display and what to pass are two different things
ah, I see, I still keep it in agent.extra_docker_arguments
the agent knows which args to look for and to split them on =
agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD"]
agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD=password"]
like this? or ["DB_PASSWORD", "password"]
by default the agent will hide the clearml secrets, AWS secrets etc.
add any other keys you want to hide to that list
in the agent configuration, use:agent.hide_docker_command_env_vars.extra_keys: ["DB_PASSWORD"]
it only hides a pre-specified set of args (since most of the time you do want to see the value for non-secrets)
Oh, wait, my bad 😆 - you need to tell the agent this env var should be hidden 🙂
obviously you should replace the passwords with something there 🙂
So maybe that's something I missed? 😞 - Can you send a more complete log so I'll try to find out where this is coming from?
DilapidatedDucks58 which ClearML Agent version are you using? I remember adding specific sanitation to the logs for these cases in the latest versions...
it works, but it's not very helpful since everybody can see a secret in logs:
Executing: ['docker', 'run', '-t', '--gpus', '"device=0"', '-e', 'DB_PASSWORD=password']
this is probably what I need, thanks. I'll check if it works
agent.extra_docker_arguments: ["-e", "MY_ENV_VAR=foo"]
If you're using docker, you can just add environment variables in the extra_docker_args
section
we're using os.getenv in the script to get a value for these secrets
right now we can pass github secrets to the clearml agent training containers ( CLEARML_AGENT_GIT_PASS) to install private repos
we need a way to pass secrets to access our database with annotations
DilapidatedDucks58 can you provide an example?
will it pass variables to the training containers?
I guess I could edit docker-compose.yaml