Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

HOWTO: Use your own blender distributive

Rabit edited this page Oct 1, 2020 · 1 revision

By default BlendNet provides a way to choose the original available version of blender distributive, but in case you want to use the additional plugins, settings or a custom build of blender - there is a way to set the custom url/checksum to your own distributive.

Here you will find how to tell the cloud providers (GCP/AWS/...) which distributive of blender to use on Manager and Agents. For the Local provider you have the complete control over the environments, and about how to setup that you can read here: HOWTO: Setup provider: Your own render farm (local).

Process overview

The way cloud providers is working - they download the required version of the blender distributive during the instance creation (exactly creation, during stop/start procedure it will reuse the existing unpacked distributive (BlendNet v0.3.2)). When the Manager or Agent going through startup procedure it checks /srv/blender/blender executable existing and if there is none - it downloads the specified distributive (for now it uses the special instance startup script where the url/checksum is put during the instance creation) URL using HTTP protocol and verifies the checksum. Later it unpacks the distributive using tar to /srv/blender and uses it to run Manager or Agent.

Quite simple process, but the important thing for our case - you will need to make sure you have the custom distributive available through HTTP (or valid HTTPS) and the Manager or Agent have direct access to this URL.

Steps to prepare the dist

1. Download

The easiest way to create your own distributive - is to repack the original blender release. You can download the required version from the official blender site: https://www.blender.org/ - make sure you're downloading linux amd64 tar.* (tar.gz, tar.bz2, tar.xz, ...) binaries and it's recommended to use linux host to execute the operations to be sure the file permissions will be set correctly.

2. Unpack

Now just unpack it somewhere:

$ tar xf blender-2.90-linux64.tar.xz

and you will get the folder, like blender-2.90.0-linux64 where all the files of dist are stored.

3. Alter the distributive

It's time to apply your changes - the dist contains multiple interesting folders, but the most interesting ones is:

  • blender-2.90.0-linux64/2.90/scripts/addons/ - to put your unpacked addons here
  • blender-2.90.0-linux64/2.90/scripts/startup/ - contains the blender startup scripts. You can modify them to change the startup behavior, for example to activate the new addon.

4. Pack it back

It's important to save the existing distributive structure - means you need to pack the entire folder, not the binaries. And it's better to preserve the original compression mechanism - like XZ in our case:

$ tar -c --xz -f ./blender-2.90-linux64-custom.tar.xz ./blender-2.90.0-linux64

5. Get the checksum

When you get the dist archive file you can calculate it's checksum - to be sure that the file will not be altered during receiving process on Manager and Agent. So let's make it happen:

$ sha256sum ./blender-2.90-linux64-custom.tar.xz

and the result will look like:

581c2a377275617092e9ab31343c0550772056e6bddfdbf80e5898b1d8b21974  ../blender-2.90-linux64-custom.tar.xz

You will need to use the first part (64 symbols) of this result later in Addon UI.

Ways to store the dist

Cloud bucket

The custom distributive should be available for Manager & Agent instance to download and you can use the cloud bucket for such purpose. Cloud buckets are quite complicated things in terms of access restrictions, so to simplify the example we can use the bucket was already created by BlendNet during the first Manager instance creation - it usually looks like:

  • AWS - blendnet-<SESSION_ID>

    AWS - BlendNet bucket

  • GCP - <PROJECT_ID>-blendnet-<SESSION_ID>

    GCP - BlendNet bucket

1. Upload the file

Find the upload button and choose your created custom distributive file:

  • AWS:

    AWS - BlendNet bucket file upload

    AWS - BlendNet bucket file uploaded

  • GCP:

    GCP - BlendNet bucket file upload

    GCP - BlendNet bucket file uploaded

2. Get the URL of the file

  • AWS:

    AWS - BlendNet get bucket link

  • GCP:

    GCP - BlendNet get bucket link

Use Blender custom dist

Now when it's prepared - you can modify the Addon settings, just check the checkbox and put the URL and checksum into the fields.

Addon - BlendNet custom dist checkbox

Addon - BlendNet custom dist fields

When it's done - you can recreate the Manager instance and use your own custom blender for render.