From 790f7c5937512e5ba2fc513356b01ad3e5fe201c Mon Sep 17 00:00:00 2001 From: Andrei Tsaregorodtsev Date: Mon, 6 Nov 2023 10:58:07 +0100 Subject: [PATCH] sweep: #7266 Preinstalled env pilot options in SiteDirector --- .../WorkloadManagementSystem/Agent/SiteDirector.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py index 5a070c4eb5d..ce465cd425d 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py @@ -1022,6 +1022,18 @@ def _getPilotOptions(self, queue, **kwargs): else: self.log.info("DIRAC project will be installed by pilots") + # Preinstalled environment defined ? + preinstalledEnv = opsHelper.getValue("Pilot/PreinstalledEnv", "") + preinstalledEnvPrefix = opsHelper.getValue("Pilot/PreinstalledEnvPrefix", "") + if preinstalledEnv: + pilotOptions.append(f"--preinstalledEnv={preinstalledEnv}") + elif preinstalledEnvPrefix: + pilotOptions.append(f"--preinstalledEnvPrefix={preinstalledEnvPrefix}") + + # Pilot Logging defined? + if opsHelper.getValue("/Services/JobMonitoring/usePilotsLoggingFlag", False): + pilotOptions.append("-z ") + pilotOptions.append("--pythonVersion=3") # DIRAC Extensions to be used in pilots