Containerizing Arnold Renderer with Singularity 3.0

By Staff

Sep 27, 2018 | Blog, How To Guides

Arnold is an advanced Monte Carlo ray tracing renderer built for the demands of feature-length animation and visual effects rendering, largely used to create movies and video games.

Arnold must be downloaded and installed manually.  In this example we will download the Arnold software, move it to the /tmp directory where it will be accessible within the container, create a sandbox container that we can interact with it in writable mode, and manually install Arnold.  This is not the standard best-practices workflow for creating Singularity containers, but may be necessary in some cases where non-interactive installations are the only method available.

In order to download Arnold, you will need to sign in or create an account with AutoDesk:
https://www.solidangle.com/arnold/try/

From within the container, copy (or move) the installer to the /tmp directory where it will be accessible inside the container at runtime.

$ sudo cp ~/Downloads/MtoA-3.1.0.1-linux-2018.run /tmp/

This example was tested using Arnold for Maya for Linux 64 bit 2018 version.

Here is the definition file that we will use to create a base sandbox container suitable for interactive installation of Arnold:

Bootstrap: library
From: debian:9

%environment
    # We will install arnold to /opt/arnold
    PATH=/opt/arnold/bin:$PATH
    export PATH

    # If you have a license server, you can set this
    # -- https://support.solidangle.com/display/A5AILIC/Setting+solidangle_LICENSE+on+the+command+line
    # solidangle_LICENSE=5053@server
    # export solidangle_LICENSE

%post
    apt-get update

    # Required by Arnold
    apt-get -y install python less libx11-6
   
%runscript
    # Pass any options as kick CLI options
    /opt/arnold/bin/kick "$@"

You can download the definition file with:

$ wget https://raw.githubusercontent.com/sylabs/examples/master/graphics/rendering/arnold/arnold.def

Build the base container like so:

$ sudo singularity build --sandbox arnold/ arnold.def

Start up a shell, in a ––writable sandbox container

$ sudo singularity shell --writable arnold/

Install Arnold to /opt/arnold …

> sh /tmp/MtoA-3.1.0.1-linux-2018.run
  • Read through the License Agreement
  • Type — accept — if accepted
  • Enter — 2 — for the Install mode
  • Enter — /opt/arnold — for the Install location

After completing the interactive installation procedure exit the container.

> exit

Download a sample file to your current working directory:
https://support.solidangle.com/display/A5ARP/.ass+File+Examples

We’ll use: cornell.ass

After downloading the file, move it to your current working directory (which should also be where your arnold/ sandbox container is located).

$ mv ~/Downloads/cornell.ass .

Run a quick test render (without render window):.

$ singularity run arnold/ -i cornell.ass -dw

Any option after the image (in this case arnold/), will be passed to the kick program.

Check output at: cornell.jpg

With the cornell.ass example, you will get output like:

Optionally you can also build a SIF image from the sandbox install.

Please note that this is not considered to be a best practice workflow. If you create a SIF image from an interactive sandbox session, the definition file that is saved in the SIF sandbox will not reflect all of the changes that have been made to the image. However, with Arnold there is no alternative but to install interactively.

$ sudo singularity build arnold.sif arnold/

Now, you can test again using the SIF file:

$ rm cornell.jpg
$ singularity run arnold.sif -i cornell.ass -dw

If you have a License for Arnold, you can set the value of solidangle_LICENSE in the %environment section of the Definition file, or by running Singularity and giving it the value to pass into the container:

$ SINGULARITYENV_solidangle_LICENSE=5053@server \
    singularity run arnold.sif -i cornell.ass -dw

Join Our Mailing List

Related Posts

An Introduction to Singularity Containers

Enabling Portable and Secure Computing Environments for High-Performance Workloads.As part of their ongoing efforts to streamline workflows, enhance productivity, and save time, engineers, and developers in enterprises and high performance computing (HPC) focused...

read more

SingularityCE Now Available in EPEL

EPEL (Extra Packages for Enterprise Linux) is a repository of additional packages for Enterprise Linux, including Red Hat Enterprise Linux, AlmaLinux, Oracle Linux, Rocky Linux and others. By integrating SingularityCE with EPEL, starting with release 3.10.4, users may...

read more