# Render farms

> Render on Deadline 10, AWS Deadline Cloud (Open Job Description), OpenCue or Flamenco, on GPU or CPU machines, with no licence per render machine.

Oink renders on a farm with the same [command-line render](/docs/nuke-users/command-line-render) you use in a terminal: `render.sh` (Windows: `render.bat`) with the standard render flags. There is no render licence, so every machine on the farm can render.

The `farm/` folder in the install has ready-made integrations for four farm managers:

| Farm manager | What you install | How jobs are split |
|---|---|---|
| **Deadline 10** | a Deadline plugin (one command) | tasks of N frames; one job for all Writes, or one job per Write |
| **AWS Deadline Cloud**, or any machine with `openjd` | an Open Job Description template | tasks of N frames; one step per Write |
| **OpenCue** | nothing on the farm (a submit script) | one layer per Write, chunks of N frames |
| **Flamenco 3** | a job type script on the Manager | tasks of N frames, Write by Write |

## What every integration does

- **Frames in chunks.** Each task renders a few frames, because starting the renderer takes about 2.5 seconds. 5 to 10 frames per task is a good start.
- **Write nodes.** All enabled Writes in render order, or the ones you list. A Write that reads another Write's output (a precomp) renders first: the submitters work this out from the script.
- **GPU or CPU.** Every render's first log line says what it runs on, for example `Renderer: GPU, NVIDIA GeForce RTX 4090` or `Renderer: CPU (software: llvmpipe)`. Choose a renderer per job:
  - `any` (default): the GPU, or the CPU with a warning when a machine has no working GPU;
  - `gpu`: fail the task on a machine without a working GPU (a broken driver, or a container that does not expose the GPU), instead of rendering ten times slower;
  - `cpu`: render on machines with no GPU at all. Needs Mesa's software Vulkan driver (`mesa-vulkan-drivers` on Rocky / RHEL and Debian / Ubuntu). The pixels are the same as on a GPU.
- **Paths between Windows, Linux and macOS.** Paths inside the script (Read and Write files) are mapped for each machine: by Deadline's Mapped Paths, or by Open Job Description's path mapping rules.
- **Progress and errors.** The farm shows `Frame 1001 (3 of 10)` as task progress, and fails the task on `ERROR:` lines or a non-zero exit code (3 = no usable GPU on that machine).

Every render machine needs Oink installed (the install folder with `render.sh`, and its `blender/` folder if you use the Blender engine), at the same path or at a path the farm knows per platform.

## Deadline 10

Deadline 10 is free (no licence since 10.1.23).

1. Install the plugin into your repository (once):

   ```
   python3 farm/deadline/install.py --repository /mnt/DeadlineRepository10 \
       --render-executable /mnt/apps/comp/render.sh --render-executable 'Z:\apps\comp\render.bat'
   ```

   Change the render command paths later in Deadline Monitor: **Tools › Configure Plugins**.
2. Submit a script:

   ```
   python3 farm/deadline/submit.py shot.oink -F 1001-1100 --chunk-size 10 --job-per-write --pool comp
   ```

   `--job-per-write` makes one job per Write in a batch, with precomps first; `--renderer gpu` or `--renderer cpu` picks the renderer; `--submit-script` sends the script with the job.

Job settings in Monitor: Script File, Write Nodes, Threads, Continue On Error, Renderer, GPU Index, GPUs Per Task. GPU choice: the job's GPU Index, else the worker's **GPU Affinity**, else GPUs Per Task for concurrent tasks.

## AWS Deadline Cloud and Open Job Description

The Open Job Description template runs as it is on AWS Deadline Cloud, and on any single machine with the `openjd` command (`pip install openjd-cli`):

```
openjd run farm/openjd/render.template.yaml -p ScriptFile=/shows/sh010/comp.oink \
    -p Frames=1001-1100 -p ChunkSize=10 -p RenderCommand=/opt/comp/render.sh
```

For one step per Write node, make a job bundle:

```
python3 farm/openjd/make_bundle.py comp.oink -o bundle/ -F 1001-1100 --chunk-size 10
```

On Deadline Cloud, the render machines get Oink from a conda package (a recipe outline is in `farm/openjd/conda/`); pass the package name in the job's `CondaPackages` parameter. `--renderer gpu` asks for a machine with a GPU.

## OpenCue

```
pip install opencue-pyoutline opencue-pycue packaging
CUEBOT_HOSTS=cuebot python3 farm/opencue/submit.py comp.oink -F 1001-1100 --chunk-size 10 \
    --show myshow --shot sh010 --gpus 1 --gpu-memory 4g
```

Each Write becomes a layer named after it. A comp layer waits for its precomp frame by frame. `--renderer cpu` asks for no GPU. `--print-spec` prints the job without sending it.

## Flamenco 3

1. Install the job type: `python3 farm/flamenco/install.py --manager-dir /opt/flamenco`.
2. Tell the Manager where the render command is on each platform, in `flamenco-manager.yaml`, then restart it:

   ```yaml
   variables:
     comp_render:
       values:
         - platform: linux
           value: /mnt/apps/comp/render.sh
         - platform: windows
           value: Z:\apps\comp\render.bat
   ```

3. Submit: `python3 farm/flamenco/submit.py comp.oink --manager http://flamenco:8080 -F 1-100 --chunk-size 10`.

Flamenco cannot schedule GPUs: run one worker per GPU, and submit with `--renderer gpu`.

## Other farm managers

Any farm that runs a command per task works: call `render.sh -x -F <first>-<last> -X <Write> --renderer gpu <script>` and treat a non-zero exit code as a failure. `render.sh --list-writes <script>` prints the script's Write nodes and their dependencies as JSON for your own submitter.

## Checked against real servers

On 2026-10-03, with two Linux machines (each with an RTX 4090) and a 20-frame UHD comp:

- **LAN farm:** 10 frames on each machine, identical to a one-machine `render.sh` render, pixel for pixel.
- **OpenCue:** a real cuebot (1.19.1) with PostgreSQL and a RQD host: 20 frames, identical.
- **Flamenco 3.9.3:** a real Manager with workers on both machines (tasks split between them): 20 frames, identical.
- **Open Job Description:** a warm-worker template (`farm/openjd/render_warm.template.yaml`) keeps one engine for all the tasks of a step. It was checked on the CPU against `render.sh`.

`render.sh` always takes the machine's GPU lease, so a farm worker never fights another render for GPU memory. Do not run farm workers on the machine you work on.

## Not verified yet

- Deadline 10: tested with a stand-in for Deadline's plugin interface, not a real repository.
- AWS Deadline Cloud: the template was run locally with `openjd`; no cloud job was submitted, and the conda package has not been built.
- AI nodes as farm jobs on remote workers are not built.


---
Sources: farm/README.md, farm/farmlib.py, farm/openjd/render.template.yaml, farm/openjd/make_bundle.py, farm/deadline/plugin/plugin.py, farm/deadline/plugin/plugin.options, farm/deadline/install.py, farm/deadline/submit.py, farm/opencue/submit.py, farm/flamenco/job-type.js, farm/flamenco/install.py, farm/flamenco/submit.py, docs/notes/p11-farm.md, opencomp_server/render_cli.py
