AWS Thinkbox Discussion Forums

Houdini Deadline ROP not inheriting Environment Variables

Hi,

I’m trying to use the Deadline ROP to send sims/renders to farm, but it’s not using the Environment Variables from my scene file. I’m setting these variables at startup.
Any idea on how I can inherit the environment variables?

Thanks,
Prateek Rangineni

Hi,
Turns out, we were using cmd to get the env variables. So these are not actually saved in the hip file.
We can see the env variables saved in Edit->Aliases and Variables

I was looking at Help → About Houdini …

So to save these variables, I could set the env variables using, let’s say (maybe in 456 script or Deadline ROP when submitting?)

for var in os.environ:
    hou.hscript("setenv -s %s=%s"%(var, os.environ[var]))

Then, it shows up in Edit → Aliases and Variables…
And sending it to farm works.

Thanks

1 Like

Vvariables in Aliases and Variables and system environment variables are different things. It is valid to copy one to the other, if you need to.

I had to hack the SubmitHoudiniToDeadlineFunctions.py to add in:

type or paste code here
```                    fileHandle.write("EnvironmentKeyValue0=HOUDINI_PATH={}\n".format(os.environ.get('HOUDINI_PATH')))
                    fileHandle.write("EnvironmentKeyValue1=HOUDINI_OTLSCAN_PATH={}\n".format(os.environ.get('HOUDINI_OTLSCAN_PATH')))
                    fileHandle.write("EnvironmentKeyValue2=PATH={}\n".format(os.environ.get('PATH')))
                    fileHandle.write("EnvironmentKeyValue3=PYTHONPATH={}\n".format(os.environ.get('PYTHONPATH')))

It seems like having a parameter on the Deadline ROP where the user can list ENV vars to put into the submission might be a more appropriate way to go.

Privacy | Site terms | Cookie preferences