Skip to content

container.yml Reference

The container.yml file defines a Brane package — its metadata, dependencies, files, entrypoint, and available functions.

name: data_processor
version: 2.1.0
kind: ecu
dependencies:
- python3
- python3-pip
- python3-numpy
files:
- src/processor.py
- src/utils.py
- requirements.txt
entrypoint:
kind: task
exec: src/processor.py
actions:
'preprocess':
command:
args:
- preprocess
input:
- name: dataset_path
type: string
- name: normalize
type: boolean
output:
- name: result_path
type: string
'analyze':
command:
args:
- analyze
input:
- name: data
type: string
- name: threshold
type: real
output:
- name: summary
type: string
- name: score
type: real

Package identifier. Must be unique within the registry.

name: my_package

Semantic version string.

version: 1.0.0

Package type. Currently supported:

KindDescription
ecuExecutable Code Unit — arbitrary code in a container
kind: ecu

System packages to install via apt in the container.

dependencies:
- python3
- python3-pip
- libssl-dev

Files and directories to copy into the container. Paths are relative to the container.yml location.

files:
- script.py
- lib/
- data/config.json

Defines how the container starts.

entrypoint:
kind: task # 'task' for synchronous execution
exec: script.py

Defines the functions the package exposes.

actions:
'function_name':
command:
args:
- function_name # Passed as CLI arguments
input:
- name: param_name
type: string # string, integer, real, boolean
output:
- name: result_name
type: string
TypeDescriptionYAML Example
stringText valuekey: "value"
integerWhole numberkey: 42
realFloating pointkey: 3.14
booleanTrue/falsekey: true

When Brane executes a function:

  1. Input values are set as environment variables (variable name = parameter name)
  2. The command.args are passed as command-line arguments to the entrypoint
  3. The function must print its output to stdout as YAML
  4. The YAML keys must match the declared output parameter names

For a function call preprocess("data.csv", true):

Environment:
dataset_path=data.csv
normalize=true
Command:
python3 src/processor.py preprocess
Expected stdout:
result_path: "/output/cleaned.csv"