dralois/blender-module-builder (Forked from here)
This docker container builds Blender 2.82a/2.83 as a python module, using CentOS 7 & devtoolset 6 (same as the official builds). The container comes completely setup for this task and compiles a portable version of Blender as a python module for Linux, able to be executed on most normal linux distributions. The requirement on the target system are python 3.7 (other versions may crash on import), libgomp (OpenMP) and mesa-GL (OpenGL). This container can optionally also build Appleseed 2.1.0 with python 3 bindings, which is required for the Blender addon. The Appleseed build script automatically downloads & builds Blenderseed and stores the addon in the output directory (/root/build). This step has to be invoked manually within the container.
docker run --storage-opt size=35G dralois/blender-python-module-builder
docker run -it --storage-opt size=35G dralois/blender-python-module-builder bash
Then, either run the automatic build script
# 0) Optionally switch to Blender v2.83
export BLV=v2.83
# 1) Build bpy using the build script
sh /usr/bin/build.sh
Or build manually (-> Other builds are possible too!)
Building manually may lead to compile errors and non-portable builds!
# 0) Optionally switch to Blender v2.83
export BLV=blender-v2.83-release
# 1) Go to Blender's source dir
cd root/blender-git/
# 2a) For shared builds (faster, not portable):
sh ./build_files/build_environment/install_deps.sh --with-all --build-all
# 2b) For static builds (slower, portable):
make deps
# 3) Build Blender of your choice (bpy has to be built without jemalloc!)
make [full] [lite] [bpy BUILD_CMAKE_ARGS="-D WITH_MEM_JEMALLOC=OFF"]
Blender should have been built already for this to work, but simply initiating the repository in the correct path is technically enough. If this is the case, all appleseed dependencies are built using Blender's dependency build pipeline. This includes the specific boost python version that is necessary for Appleseed to work with Blender. The Appleseed dependency versions currently do not match up 100% with the ones used for official builds due to compilation issues. Please consider that if bugs or crashes occur, it might be because of this cavity. On the machines I tested this build however, it worked flawlessly.
# Builds appleseed & blenderseed
sh /usr/bin/appleseed.sh
dralois/bpy-builder forked from here