submit Nuke job from command line help

I am using this to submit Nuke script to Deadline:
Newbe here trying to work with Deadline.

deadlinecommand SubmitCommandLineJob -executable X:\myShow\myShow_render_test\raw_convert.nk -frames 3207-3208 -name raw_convert -pool comp -group nuke

Exception during render: An error occurred in RenderTasks(): Error starting “X:\myShow\myShow_render_test\raw_convert.nk” in “X:\myShow\myShow_render_test” :
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage

Does this mean that it cannot find Nuke to run the job?
If so, what to add or change to the command line to get it to run?

Any help would be greatly appreciated.

thank you,

dennis

So, on further research it looks like I need to create a “dlinit and py File”, correct?

dennis

Close, but not quite right :slight_smile:

First off, you’re using the wrong command for this; SubmitCommandLineJob is only for submitting jobs to our CommandLine plugin (which just runs simple commands on the slaves). It can definitely be a bit misleading, and we might have to rename it to avoid confusion; you’re definitely not the first one to make this mistake.

In order to submit Jobs from the command line, you actually need to build up two .job files (which are pretty much just .ini files in disguise). The first one will be for generic Deadline Job settings (like plugin name, pool, group, priority, etc) – for a comprehensive list of all available settings in this first file, see our documentation here: thinkboxsoftware.com/deadlin … o_Deadline.

The second .job file you want to build up is for the plugin-specific settings. In your case, it’ll be Nuke-specific stuff. This is less well documented, since it’s going to vary from plugin to plugin, but it’s going to be stuff like path to scene file (nuke script), whether to use 32-bit or 64-bit, batch mode, or any special one-off options we may have for that particular Plugin. As an example, I just did a Nuke submission through the Deadline Monitor, and here are the values that were in the Plugin Info file for Nuke:

SceneFile=C:\Users\johngaudet\TestData\testnuk2.nk Version=6.2 Build=None Threads=0 RamUse=0 NukeX=True BatchMode=True ContinueOnError=True

Looking at the .job files the Monitor creates on submission is, I find, an easy way to get good boilerplate submission files, or just to help you out when you’re starting to look at command line submission. They will generally appear in %LOCALAPPDATA%\Thinkbox\Deadline\temp on Windows 7, if you’re running on a Mac, Linux box or XP I’d have to dig up our temp path for that, since I don’t know it off the top of my head. Anyways, the temp files you’d be looking for after you’ve done a test Nuke submission through the monitor are “nuke_job_info.job” and “nuke_plugin_info.job”. These are just plain text, and should give you a good idea of what your files should look like :slight_smile:

Now, once you’ve built up both your Job info file and your Plugin info file, the submission command itself is actually super simple:

deadlinecommand "C:\path\to\job_info_file.job" "C:\path\to\plugin_info_file.job"

And that’s it!

Let me know if you have any questions, or if you are unclear on any of the stuff I just described.

Cheers,

  • Jon

Thank you for the reply and info.
I am a little surprised that you cannot just supple the data and add -plugin nuke to run a job from the command line.

In any event, I wrote several scripts using Python that are used in Nuke. They convert Canon CR2 image files into EXR and JPG.
Production wanted little or no input from the user and there are gaps in the frame number sequences.
This works locally with this at the end of the scripts: nuke.render(w1, ranges)

I had hoped to replace the nuke.render with the deadline command:
deadlinecommand “C:\path\to\job_info_file.job” “C:\path\to\plugin_info_file.job”

How or what would I need to do to create the job_info_file.job and plugin_info_file.job on the fly from the data like frames ranges,
etc my script collects? The way our system is setup I would need to put these two files into the parent directory of the CR2 files.

Any help or tips would be greatly appreciated.

thank you for your time,

dennis

Ok, I think I get it. I am working on creating these to files to be written out just before the deadline command is run.
I will let you know if I run into any issues and thank you for the help.

dennis

Sorry I have posted any update. I got assigned to another project which took me away from this one.
I did manage to get the proper files written out and the Nuke script now submits to Deadline.

However, there is a new problem to resolve.

The script reads in Canon and Nikon raw files and writes them back out as jpg’s.
In the Deadline log it said that it could not find the “dcraw” plugin. We downloaded this
and put into the path on the Nuke render farm procs.

The error is still coming up so it would appear that we have not placed this plugin in the proper place.

Can you tell me hot to implement the “dcraw” plugin for Deadline?

thank you for your help,

dennis

Forgot to add the error:

0: STDOUT: ‘dcraw’ is not recognized as an internal or external command,
0: STDOUT: operable program or batch file.
0: STDOUT: [08:47:05 Central Daylight Time] Read nuke script: C:/Users/renderlite/AppData/Local/Temp/canon_raw_convert_thread0.nk
0: STDOUT: crwReader: dcraw -4 -c “X:/beautifulcreatures_bcr-2453/_reference/onset/BCR_Day29_20120524_render_test/CR2/IMG_3212.CR2”
0: STDOUT: [ 8:47.05] ERROR: Read1:
0: STDOUT: Error running dcraw -4 -c “X:/beautifulcreatures_bcr-2453/_reference/onset/BCR_Day29_20120524_render_test/CR2/IMG_3212.CR2”
0: STDOUT: If you have the “dcraw” software installed, make sure that it’s in your path.
0: STDOUT: If you don’t have it, the latest version is available as source from:
0: STDOUT: cybercom.net/~dcoffin/dcraw/
0: STDOUT: where you can also find links to precompiled versions for Windows and OSX.

If you open up Nuke in interactive mode on a node (without Deadline), does it load the plugin?

Also, have you tried restarting the nodes since you installed dcraw? The error mentions that the plugin might not be in your path, and if this is configured in an environment variable, it’s possible that Deadline isn’t recognizing it yet. Restarting the nodes ensures that everything is refreshed.

Cheers,

  • Ryan

Thank you for the reply. I will ask IT to check on that and let you know.

dennis

The render machines were re started and still getting the same error.

Where should IT put the “dcraw” plugin for the render nodes?
They say it is in the path of the Nuke render nodes, but I still do not see it being loaded in the log files.

I see this in the log files that it does load other plugins:
STDOUT: Loading C:/Program Files/Nuke6.3v8/plugins/

Should it go here? Does anything need to be added to the init.py file for each install?

thx,

dennis

Hi Dennis,

I would imagine you need to install the dcraw plugin on the nodes in the same place you installed it on the workstations. Deadline doesn’t control where Nuke looks for plugins, that’s why I’m curious if Nuke loads the plugin on a node if you launch it without Deadline. Anyways, if Nuke is looking for the plugins in C:/Program Files/Nuke6.3v8/plugins/, that’s probably the place where it should be installed to. I don’t have any experience installing plugins for Nuke, so unfortunately I can’t be of more help. :slight_smile:

Cheers,

  • Ryan

Hello. Can anyone comment on where the “dc raw” file live for Nuke to see it in the path on the Nuke render nodes?
Thank you,

dennis

Oh, sorry I just saw your post and pass the info onto IT.

Thanks, for the help,

dennis