mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 08:18:25 +02:00
[core] desc.node: Use the process environment for the nodes' execution
This commit is contained in:
parent
7fc3727c7b
commit
3ae5a44666
1 changed files with 6 additions and 4 deletions
|
@ -277,17 +277,19 @@ class CommandLineNode(BaseNode):
|
|||
return MrNodeType.COMMANDLINE
|
||||
|
||||
def buildCommandLine(self, chunk):
|
||||
cmdPrefix = ""
|
||||
cmdSuffix = ""
|
||||
cmdPrefix = chunk.node.nodeDesc.plugin.processEnv.getCommandPrefix()
|
||||
cmdSuffix = chunk.node.nodeDesc.plugin.processEnv.getCommandSuffix()
|
||||
if chunk.node.isParallelized and chunk.node.size > 1:
|
||||
cmdSuffix = " " + self.commandLineRange.format(**chunk.range.toDict())
|
||||
cmdSuffix = cmdSuffix + " " + self.commandLineRange.format(**chunk.range.toDict())
|
||||
|
||||
return cmdPrefix + chunk.node.nodeDesc.commandLine.format(**chunk.node._cmdVars) + cmdSuffix
|
||||
|
||||
def processChunk(self, chunk):
|
||||
cmd = self.buildCommandLine(chunk)
|
||||
# TODO: Setup runtime env
|
||||
self.executeChunkCommandLine(chunk, cmd)
|
||||
runtimeEnv = chunk.node.nodeDesc.plugin.processEnv.getEnvDict()
|
||||
print(runtimeEnv["PATH"])
|
||||
self.executeChunkCommandLine(chunk, cmd, env=runtimeEnv)
|
||||
|
||||
|
||||
# Specific command line node for AliceVision apps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue