From cd7844f5e3bdfb4659a4e0da0b3c6ddbeb3b97d4 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 --- src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py index 5a070c4eb5d..68f528f67a8 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/SiteDirector.py @@ -1022,6 +1022,14 @@ 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}") + pilotOptions.append("--pythonVersion=3") # DIRAC Extensions to be used in pilots