AWS Thinkbox Discussion Forums

Rez implementation

Hi!

I’m currently trying to use Rez (https://github.com/nerdvegas/rez) in our plugins (Redshift to begin with) to set the necessary environment at rendertime.
Rez configures the environment (including PATH to find the application) and executes the binary in one go, for example like this:

rez-env redshift -- redshiftCmdLine -my_command_args

How would I accomplish this with deadline? If I modify RenderExecutable() in my custom plugin to return rez-env redshift -- redshiftCmdLine it doesn’t work because deadline is searching for the executable in places like PATH and fails of course because nothing is set yet.

Any help would be greatly appreciated.

Cheers,

Felix

Ah, this isn’t the first time I’ve crossed paths with Rez.

I’d write a stand-in batch file for each app you’re going to push through Rez and have Deadline run that. Here’s some info on how to pass along flags:
stackoverflow.com/a/382312/187769

Heh. Just realized you may be on Linux. If that’s the case pretend “batch” was “shell” and use $@.

Couple more things as I’m passing…

I really like our new’ish Pipeline bootstrap solution, which allows you to dynamically modify the command line just before it gets executed for 1 or all job plugin types: docs.thinkboxsoftware.com/produc … y-cmd-line

You can also write custom event plugins for when a Slave starts up, shuts down, starts a new job; intercept at any of these times and then execute REZ to deploy and configure an environment and then exit the event plugin on successful completion and then continue to run the render job. Nice thing here, is you can raise an error if Rez goes belly up:
docs.thinkboxsoftware.com/produc … ing-events

Edwin’s example works as well. As you prefer. :slight_smile:

I do enjoy the command re-write. I’d completely forgotten about it. :smiley:

Cheerio,
I know this post is really old but I’m facing the same issue right now. I want to resolve REZ environments remotely on any render node only for maya right now. However, I’m not quite gettings there.
I set up a PreJobScriptthat injects a custom funtion into the plugins ModifyCommandLineCallback. That function returns the path to a custom .bat, the passed args and the cwd. The batch file sets PATH to be able to launch the rez installation located on a network share. When running where python and where rez I do get some valid output which makes me think the installation is proper.
However, when executing this on a render node I get the following error:

WARNING: Cannot write stdin to process because it is no longer runnning.
WARNING: Monitored managed process MayaBatch is no longer running

Could anyone help me out on this one?

Cheers,
Tony

What we had to do was take a plugin and customise it with our Rez environment implementation by injecting it in the pre-task component of the plugin.

Privacy | Site terms | Cookie preferences