Developers interested in creating a custom channel will need to get the ‘ana’ repository from GitHub and install the Docker engine. Rendered.ai recommends using the Docker Development Container that ships with the Ana code via the Remote-Containers VSCode extension. Developing in the development contained ensures your environment is the same as the deployed channel.
Channel development is supported in the Docker Development Container on any operating system.
Docker Dev Environment
Rendered.ai provides a Docker Development container that exposes the python environment used by Blender. This makes testing a channel codebase readily accessible on any platform. All you need in addition to your code is Docker. Developing channels directly with Docker Dev container is the best way to mimic what will be run on AWS.
Alternatively, the Local Development Environment describes how you would configure a Blender python environment and test the Ana code without the Docker Dev Container. This option has been tested on Windows 11, and most MacOS and Linux distributions.
Get the Repository
Each channel on the Rendered.ai platform can be based on a fork of the Github repository, https://github.com/Rendered-ai/ana. This is a public facing version of the code base that will be update as features are added.
Fork The Ana Repository to Your Account
Once the repository is forked, it is owned by your account. Make a local clone as usual to get started.
$ git clone firstname.lastname@example.org:<your_account>/ana.git
Test your docker installation
It’s always a good idea to check your Docker Engine is communicating with public registries: https://hub.docker.com/_/hello-world
docker run hello-world
Successful Test of Docker Engine
Troubleshooting (Linux / Mac): Allow your non-root user to execute docker
Important: Log out and log back in again to refresh group membership.
Open the Ana code in VSCode: select “Open Folder” and find the top level ana folder of the cloned repository.
Get the Remote - Containers Extension
Extension Search “Remote - Containers”
Build the Dev Container
As described in the VSCode Tutorial: Remote development in Containers, build your dev docker. Open the command pallet with
P) and finding “Rebuild and Reopen in Container”.
Search for Command “Rebuild and Reopen in Container”
The first time you download/build the dev container it can take quite a while.
Dev Container Build Complete Message
The dev container is ready when the bottom left corner of VSCode shows “Dev Container: Python 3”.
Dev Container Ready
The commands of clicking the bottom left green ‘Dev Container’ tab are helpful to manage it. For example, “Rebuild Container” when returning to VSCode and the dev container is stale.
Find the Container with the VSCode Docker Extension
Install the Docker Extension in the dev container. Make sure the extension is installed within the dev container. The extension may have to be installed again if it was installed before the dev container was built.
Extensions Search “Docker”
Once the Docker extensions are installed, note the Docker symbol at the bottom of the left hand pane (restart VSCode might be necessary). Clicking on the Docker icon on the left will show the local containers.
Run the Rendered.ai Example Channel to Generate an Image
Make sure the container generates images as expected s described in the Ana code README:
cd ana; blender --background --python ana.py -- --channel example --graph example_test.yml --output ../datasets --data data/
A Generated Image of the Rendered.ai Example Channel
With a development environment, users can run through the following tutorials