View a markdown version of this page

Create a conda build recipe for Blender - Deadline Cloud

Create a conda build recipe for Blender

Blender is free to use and simple to package with conda, which makes it a good starting point for learning how to create conda packages for AWS Deadline Cloud (Deadline Cloud). The Blender Foundation provides application archives for multiple operating systems. The Blender 4.5 sample recipe in the Deadline Cloud samples repository on GitHub packages these archives into a conda package.

Understanding the recipe

The recipe.yaml file defines the package metadata, source URLs, and build options in rattler-build template syntax. The recipe specifies the version number once and provides different source URLs based on the operating system.

The build section in recipe.yaml turns off binary relocation and dynamic shared object (DSO) linking checks. These options control how the package works when installed into a conda virtual environment at any directory prefix. The default values used in the build section are designed for packaging each dependency library separately, but when binary repackaging an application, you need to change them. Blender does not require any RPATH adjustment because the application archives are built with relocatability in mind. See Create a conda recipe for Maya for an example of adding relocatability.

During the package build, the build.sh or build_win.sh script runs to install files into the environment. These scripts copy the installation files into $PREFIX/opt/blender, create symlinks from $PREFIX/bin (on Linux), and set up activation scripts that configure environment variables such as BLENDER_LOCATION. On Windows, the activation script adds the Blender directory to the PATH instead of creating symlinks.

The Windows build script uses bash instead of a cmd.exe .bat file for consistency across platforms. You can install git for Windows to provide bash for package building.

The recipe also includes a deadline-cloud.yaml file that specifies the conda platforms and metadata for submitting automated package build jobs to Deadline Cloud. For more information, see Submit a package build job.

Building the Blender package

Use rattler-build publish to build the Blender 4.5 recipe and publish the package to a channel. You can publish to a local filesystem channel for testing or directly to an Amazon S3 channel for production use. If you completed the setup in Build and test packages locally, run the following command from the conda_recipes directory.

rattler-build publish blender-4.5/recipe/recipe.yaml \ --to file://$HOME/my-conda-channel \ --build-number=+1

For other publishing options: