Skip to main content

Rust render-farm controller, worker, and Python bindings

Project description

Renderacre

CI Release PyPI Python Downloads License

Renderacre is a Rust render-farm foundation inspired by Deadline: a remote controller API, standalone workers, Python submitter bindings, and Open Job Description (OpenJD) job templates for portable DCC and batch workloads.

The Python package is named renderacre and is built as a cp37-abi3 wheel, so one wheel supports CPython 3.7 and newer on each platform.

Features

  • Rust HTTP controller with job submission, worker registration, leasing, retries, task dependencies, and job state inspection.
  • Standalone worker binary that executes direct commands or OpenJD runtime payloads.
  • Official openjd-model validation and job creation for OpenJD jobtemplate-2023-09.
  • Official openjd-sessions execution for OpenJD step scripts, task parameters, environments, embedded files, and OpenJD stdout directives.
  • PyO3/maturin Python module for pipeline submitters and DCC tools.
  • CI for fmt, clippy, unit tests, controller/worker e2e smoke, and ABI3 wheel builds.
  • Release workflow for cross-platform wheels, sdist, and PyPI Trusted Publishing.

Local Development

cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\e2e_smoke.ps1
python -m maturin build --release -o target\wheels

The wheel filename should contain cp37-abi3, for example:

renderacre-0.1.0-cp37-abi3-win_amd64.whl

Run a Local Farm

Start the controller:

cargo run -p farm-controller -- --bind 127.0.0.1:7878

Start a worker:

cargo run -p farm-worker -- --controller http://127.0.0.1:7878 --name local-worker --label os=windows

Submit a direct command job:

Invoke-RestMethod `
  -Method Post `
  -Uri http://127.0.0.1:7878/v1/jobs `
  -ContentType application/json `
  -InFile .\examples\hello_job.json

Python Submitter API

Install a local build:

python -m pip install maturin
python -m maturin develop

Submit a command job:

import renderacre

job_json = renderacre.command_job(
    "hello-from-python",
    "python",
    ["-c", "print('hello from renderacre')"],
)
print(renderacre.submit_job("http://127.0.0.1:7878", job_json))

Submit an OpenJD template:

import json
import renderacre

template = open("examples/openjd_python_frames.yaml", encoding="utf-8").read()
job_json = renderacre.openjd_job(
    "openjd-demo",
    template,
    json.dumps({"Message": "hello through OpenJD"}),
)
print(renderacre.submit_job("http://127.0.0.1:7878", job_json))

OpenJD Support

Renderacre accepts an OpenJD job template under openjd.template_yaml.

The controller:

  1. Parses YAML/JSON with the official OpenJD parser.
  2. Validates the template and enabled extensions.
  3. Preprocesses typed job parameters, including PATH values.
  4. Creates the resolved OpenJD job model.
  5. Expands step parameter spaces into farm tasks.

The worker:

  1. Creates an OpenJD session.
  2. Enters job and step environments.
  3. Runs each OpenJD task through openjd-sessions.
  4. Captures stdout/status and reports the result to the controller.
  5. Exits environments and cleans the session directory.

Supported current extensions default to all extensions known by openjd-model: EXPR, FEATURE_BUNDLE_1, TASK_CHUNKING, and REDACTED_ENV_VARS.

DCC Examples

Blender:

$template = Get-Content .\examples\dcc\blender_render_openjd.yaml -Raw
$params = @{
  BlenderExecutable = "blender"
  ScriptPath = (Resolve-Path .\examples\dcc\blender_render_task.py).Path
  OutputDir = (Join-Path (Get-Location) "renders\blender")
} | ConvertTo-Json

Maya:

$template = Get-Content .\examples\dcc\maya_render_openjd.yaml -Raw
$params = @{
  MayaPython = "mayapy"
  ScriptPath = (Resolve-Path .\examples\dcc\maya_render_task.py).Path
  OutputDir = (Join-Path (Get-Location) "renders\maya")
} | ConvertTo-Json

Pass the template and parameter JSON through renderacre.openjd_job(...) or submit the equivalent REST payload to /v1/jobs.

Deployment

Recommended first deployment shape:

  • Run one controller per farm or queue: farm-controller --bind 0.0.0.0:7878.
  • Run one worker process per render node: farm-worker --controller http://controller-host:7878 --name <node-name> --label app=blender.
  • Put the controller behind a private network or authenticated reverse proxy.
  • Keep render executables and scripts on shared storage, then pass PATH parameters through OpenJD.
  • Use GitHub Releases or PyPI to distribute the renderacre wheel to submitter machines.

Current storage is in-memory by design for the first protocol slice. The scheduler boundary is isolated so SQLite/Postgres/NATS can replace it without changing the Python or REST APIs.

Release

The release workflow builds Linux, Windows, and macOS wheels plus an sdist. PyPI publishing uses Trusted Publishing through the pypi GitHub environment.

Manual release dry run:

python -m maturin build --release -o dist
python -m pip install twine
python -m twine check dist/*

Publish from GitHub:

  1. Configure PyPI Trusted Publisher for loonghao/renderacre, workflow release.yml, environment pypi.
  2. Push a vX.Y.Z tag or publish a GitHub Release.
  3. The workflow uploads artifacts to PyPI when the publish gate is active.

See docs/architecture.md for the internal layout.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

renderacre-0.1.0-cp37-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.7+Windows x86-64

renderacre-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

renderacre-0.1.0-cp37-abi3-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

File details

Details for the file renderacre-0.1.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: renderacre-0.1.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for renderacre-0.1.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d4fe85feeea68227813feafdc55b461cd26194652aad8c121536029f1734d255
MD5 cc518a7be8bf0295572e4761bec46a1a
BLAKE2b-256 50b26b0f70dc8df2fd1633e93045acf6dc16c6f49c83eda14244b9d0a8fca5bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for renderacre-0.1.0-cp37-abi3-win_amd64.whl:

Publisher: release.yml on loonghao/renderacre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file renderacre-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for renderacre-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fcfd2bd5d0db481e658ab26eba6be56f953e6da5f8826ea274f6155c6350f284
MD5 a9b9a4de77e51eced7b595e091fcfcf9
BLAKE2b-256 d76747204132fc320e7d3b27e436582bdd3fd119e9e543b3a513e4a07b439901

See more details on using hashes here.

Provenance

The following attestation bundles were made for renderacre-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on loonghao/renderacre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file renderacre-0.1.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for renderacre-0.1.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 833c367ed9933e1ab2c02c110e128b2add16e35ac50b046c9a172ac36e51d306
MD5 adac2a63932fb27dbb80a9fa01684c0d
BLAKE2b-256 b84d628c34e67d3326b1ef305b22e27654bdfdbb02881ed0223587fe38ac6b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for renderacre-0.1.0-cp37-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on loonghao/renderacre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page