Skip to content

create an Agent Skill to build, test Blender conda recipies using ~ deadline AL2023 container#201

Merged
leongdl merged 1 commit intoaws-deadline:mainlinefrom
leongdl:conda-skills
Apr 24, 2026
Merged

create an Agent Skill to build, test Blender conda recipies using ~ deadline AL2023 container#201
leongdl merged 1 commit intoaws-deadline:mainlinefrom
leongdl:conda-skills

Conversation

@leongdl
Copy link
Copy Markdown
Contributor

@leongdl leongdl commented Apr 14, 2026

What was the problem/requirement? (What/Why)

There was no reusable guide or skill for creating new Blender conda recipes for Deadline Cloud. Each new Blender version required manually figuring out the Docker setup, X11 dependencies, rattler-build commands, and testing steps from scratch.

What was the solution? (How)

Added a skills/conda-builder/ skill that documents the complete workflow for creating Blender conda recipes, from fetching SHA256 hashes to building in an AL2023 Docker container (matching the service-managed fleet OS), indexing into a local channel, and testing with openjd-cli. The skill covers headless X11/EGL dependency setup and includes a fast smoke-test render approach (640x480, 8 samples).

What is the impact of this change?

Anyone creating a new Blender version recipe can follow the skill's step-by-step workflow instead of piecing together the process manually. The skill also serves as documentation for the AL2023 Docker-based build environment setup.

How was this change tested?

Used the skill's workflow end-to-end to create the Blender 5.1.1 recipe (separate PR):

  1. Set up an AL2023 Docker container with rattler-build, miniconda, and X11/EGL libraries per the skill's Step 5.
  2. Built the Blender 5.1.1 conda package with rattler-build build (with test enabled) — blender -h test passed inside the container.
  3. Indexed the local channel with conda index and verified the package was discoverable via conda search.
  4. Created a conda environment, verified blender --version returned 5.1.1 and all BLENDER_* env vars were set.
  5. Rendered a test frame at 640x480 with 8 Cycles samples — completed in ~6 seconds.
  6. Ran a full openjd-cli end-to-end test with the blender_render job bundle and conda_queue_env_pyrattler queue environment — completed successfully in ~43 seconds.

Was this change documented?

The skill itself is the documentation — skills/blender-builder/SKILL.md contains the complete workflow, quick reference table, headless dependency list, and common mistakes section.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


I also did a clean test with blender 4.1, which is a version we did not have samples:

Blender 4.1 Conda Package Build & Test Summary

What we built

Using the conda-builder skill, we created a new blender-4.1 recipe at
deadline-cloud-samples/conda_recipes/blender-4.1/ based on the existing
blender-5.1 template. The recipe targets Blender 4.1.1 (the latest patch
release in the 4.1 series). SHA256 hashes were fetched from the official
blender-4.1.1.sha256 file on blender.org — not computed or guessed.

The recipe includes:

  • recipe/recipe.yaml — rattler-build recipe with version 4.1.1,
    major_minor 4.1, and verified SHA256 hashes for both linux-x64 and
    windows-x64 archives
  • recipe/build.sh / recipe/build_win.sh — version-agnostic build scripts
    copied from the 5.1 template (they use $PKG_VERSION)
  • deadline-cloud.yaml — Deadline Cloud build job metadata with download
    instructions for both platforms
  • README.md — updated for 4.1

Build environment

We rebuilt the al2023-deadline-worker:latest Docker image from
containers/al2023-deadline/Dockerfile.worker-equivalent, which replicates an
April 2026 snapshot of the Deadline Cloud service-managed fleet worker AMI
(AL2023 with 768 packages including X11, Mesa/EGL, GCC, Python 3.11, AWS CLI,
etc.).

Inside the container (al2023-conda-build), we installed:

  • rattler-build (latest, from GitHub releases)
  • Miniconda + conda-build (for conda index)

Build

rattler-build build \
    --recipe .../blender-4.1/recipe/recipe.yaml \
    --target-platform linux-64 \
    --output-dir /my-conda-channel

rattler-build downloaded the 4.1.1 linux-x64 archive (~298 MB), verified the
SHA256 hash, ran build.sh to install Blender into the conda prefix, and
executed the built-in test (blender -h). The test passed — Blender's full
help output was printed successfully, confirming the binary runs on AL2023 with
the container's system libraries.

Output artifact: /my-conda-channel/linux-64/blender-4.1.1-hb0f4dca_0.conda
(355.7 MiB)

Channel indexing

conda index /my-conda-channel

This generated repodata.json for the linux-64 and noarch subdirs, making
the package discoverable by conda.

Smoke test

Created a fresh conda environment, activated it, and verified Blender runs
with the correct environment variables — all inside the container via
docker exec:

docker exec al2023-conda-build bash -c '
    export PATH=/opt/conda/bin:$PATH
    conda create -y -n blender-test \
        -c file:///my-conda-channel --override-channels blender=4.1
    eval "$(/opt/conda/bin/conda shell.bash hook)"
    conda activate blender-test
    blender --version
    env | grep BLENDER
'

Results:

  • blender --versionBlender 4.1.1 (build date 2024-04-15, hash
    e1743a0317bc)
  • All environment variables set correctly:
    • BLENDER_LOCATION
    • BLENDER_VERSION=4.1
    • BLENDER_LIBRARY_PATH
    • BLENDER_SCRIPTS_PATH
    • BLENDER_PYTHON_PATH
    • BLENDER_DATAFILES_PATH

All checks passed — the package is ready for use with Deadline Cloud.

End-to-end render test with openjd-cli

Create a test scene

Created a simple Blender scene with a cube, camera, and sun light using
Blender's Python API inside the container:

docker exec al2023-conda-build bash -c '
    export PATH=/opt/conda/bin:$PATH
    eval "$(/opt/conda/bin/conda shell.bash hook)"
    conda activate blender-test
    blender --background --python-expr "
import bpy

bpy.ops.wm.read_factory_settings(use_empty=True)

bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0))

bpy.ops.object.camera_add(location=(7, -6, 5))
cam = bpy.context.active_object
cam.rotation_euler = (1.1, 0, 0.8)
bpy.context.scene.camera = cam

bpy.ops.object.light_add(type=\"SUN\", location=(5, 5, 10))

bpy.context.scene.render.engine = \"CYCLES\"
bpy.context.scene.cycles.device = \"CPU\"
bpy.context.scene.cycles.samples = 8
bpy.context.scene.render.resolution_x = 640
bpy.context.scene.render.resolution_y = 480
bpy.context.scene.render.resolution_percentage = 100
bpy.context.scene.render.image_settings.file_format = \"JPEG\"
bpy.context.scene.frame_start = 1
bpy.context.scene.frame_end = 1

bpy.ops.wm.save_as_mainfile(filepath=\"/workspace/test-cube.blend\")
print(\"Scene saved successfully\")
"
'

Output: Saved "test-cube.blend" — scene with a default cube, camera at
(7, -6, 5), and a sun light.

Install openjd-cli

docker exec al2023-conda-build bash -c '
    export PATH=/opt/conda/bin:$PATH
    pip install openjd-cli "py-rattler>=0.18,<0.19" "pyyaml>=6,<7"
'

Run the render via openjd

Used the blender_render job bundle with the conda_queue_env_pyrattler
queue environment to do a full end-to-end test — conda solve, install,
activate, and render:

docker exec al2023-conda-build bash -c '
    export PATH=/opt/conda/bin:$PATH
    mkdir -p /workspace/openjd-output
    cd /workspace/deadline-cloud-samples/job_bundles
    openjd run blender_render/template.yaml \
        --environment ../queue_environments/conda_queue_env_pyrattler.yaml \
        -p CondaPackages="blender=4.1" \
        -p CondaChannels="file:///my-conda-channel" \
        -p BlenderSceneFile=/workspace/test-cube.blend \
        -p OutputDir=/workspace/openjd-output \
        -p Frames=1 \
        -p ResolutionX=640 \
        -p ResolutionY=480 \
        -p Samples=8
'

Results

  • openjd solved the conda environment from the local channel, found
    blender-4.1.1-hb0f4dca_0.conda, installed and activated it
  • Blender rendered frame 1 at 640x480 with 8 Cycles samples (CPU), no
    denoising
  • Output file: openjd-output/output_0001.jpg
  • Session completed in ~9 seconds
  • Exit message: All actions completed successfully

@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Apr 14, 2026
Comment thread skills/blender-builder/SKILL.md Outdated
Comment thread skills/blender-builder/SKILL.md Outdated
@leongdl leongdl marked this pull request as ready for review April 21, 2026 20:02
@leongdl leongdl requested a review from a team as a code owner April 21, 2026 20:02
@godobyte godobyte self-assigned this Apr 22, 2026
@godobyte
Copy link
Copy Markdown
Contributor

Please check DCO and the PR/commit title.

@leongdl leongdl force-pushed the conda-skills branch 2 times, most recently from 6019d59 to 5bb2625 Compare April 24, 2026 04:21
@leongdl leongdl changed the title create an Agent Skill to build, test Blender conda recipies using AL2023 container create an Agent Skill to build, test Blender conda recipies using ~ deadline AL2023 container Apr 24, 2026
@leongdl
Copy link
Copy Markdown
Contributor Author

leongdl commented Apr 24, 2026

Please check DCO and the PR/commit title.

Thanks, fixed :) And now updated with a few ideas to make the skill more generic.

Comment thread containers/al2023-deadline/Dockerfile.worker-equivalent
Comment thread skills/conda-builder/dcc/blender.md Outdated
…23 container

Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
@leongdl leongdl merged commit b827a3f into aws-deadline:mainline Apr 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants