From 8a2bea3c146150a4d60f9570c5bff1a155f0f604 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 17 Mar 2024 18:58:14 +0200 Subject: [PATCH] Fix comment lines (#) are not ignored in docker startup bash script --- clearml_agent/commands/worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clearml_agent/commands/worker.py b/clearml_agent/commands/worker.py index c6588e3..41d3e1d 100644 --- a/clearml_agent/commands/worker.py +++ b/clearml_agent/commands/worker.py @@ -4279,7 +4279,8 @@ class Worker(ServiceCommandSection): if docker_bash_setup_script and docker_bash_setup_script.strip('\n '): extra_shell_script = (extra_shell_script or '') + \ ' ; '.join(line.strip() - for line in docker_bash_setup_script.split('\n') if line.strip()) + \ + for line in docker_bash_setup_script.split('\n') + if line.strip() and not line.lstrip().startswith("#")) + \ ' ; ' self.debug(