container.yml Reference
container.yml Reference
Section titled “container.yml Reference”The container.yml file defines a Brane package — its metadata, dependencies, files, entrypoint, and available functions.
Full Example
Section titled “Full Example”name: data_processorversion: 2.1.0kind: 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: realFields
Section titled “Fields”name (required)
Section titled “name (required)”Package identifier. Must be unique within the registry.
name: my_packageversion (required)
Section titled “version (required)”Semantic version string.
version: 1.0.0kind (required)
Section titled “kind (required)”Package type. Currently supported:
| Kind | Description |
|---|---|
ecu | Executable Code Unit — arbitrary code in a container |
kind: ecudependencies
Section titled “dependencies”System packages to install via apt in the container.
dependencies: - python3 - python3-pip - libssl-devFiles and directories to copy into the container. Paths are relative to the container.yml location.
files: - script.py - lib/ - data/config.jsonentrypoint
Section titled “entrypoint”Defines how the container starts.
entrypoint: kind: task # 'task' for synchronous execution exec: script.pyactions
Section titled “actions”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: stringInput/Output Types
Section titled “Input/Output Types”| Type | Description | YAML Example |
|---|---|---|
string | Text value | key: "value" |
integer | Whole number | key: 42 |
real | Floating point | key: 3.14 |
boolean | True/false | key: true |
How Functions Are Called
Section titled “How Functions Are Called”When Brane executes a function:
- Input values are set as environment variables (variable name = parameter name)
- The
command.argsare passed as command-line arguments to the entrypoint - The function must print its output to stdout as YAML
- The YAML keys must match the declared output parameter names
Example Flow
Section titled “Example Flow”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"