Parameterizing a profile with constants

The way computation tasks are described on Qarnot's platform is twofold:

  1. The profile determines the template of the task. It exposes a set of constants.
  2. The constants parametrize how the task executes.

Common constants

The available constants depend on the profile used. They can be accessed through a SDK along with their default values (see code sample below), or through the profile description in Tasq.

Python

conn.profile_details("blender").constants

To use our integrated software, you might want to look at our blog tutorial articles.

However, some constants are common to several profiles, especially the ones which allow you to bring your own Docker images. Let's take a look at those:

If an ENTRYPOINT is specified by the Dockerfile of the image used for your payload, it will be honored. E.g. with ENTRYPOINT ["echo", "Hello"] and DOCKER_CMD = " World" you will get Hello World on the console.
In addition, all constants, whether they are defined in the profile or in the launching script, will end up as an environment variable available in the container.