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
Understanding the recipe
The recipe.yaml
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$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 Windowsbash 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:
-
To publish to an Amazon S3 channel, see Publish packages to an S3 conda channel.
-
To automate builds using a Deadline Cloud package building queue, see Automate package builds with Deadline Cloud.