gyoza.yml Reference#

The gyoza.yml (or gyoza.yaml) file is the project manifest. It contains everything gyoza needs to build, deploy, and run your op.

All string values support ${ENV_VAR} and ${ENV_VAR:-default} placeholder substitution — the value is resolved from the environment at runtime, so secrets never need to be committed to the file.

Field

Required

Default

Description

name

Yes

Unique human-readable identifier for the op (e.g. classify-image). Used as the OpDefinition ID on the server.

version

Yes

Semantic version string (e.g. "1.0.0").

image

Yes

Full Docker image tag including registry prefix and version (e.g. myregistry/classify-image:1.0.0).

build

Yes

Docker build configuration. Passed directly to a generated docker-compose.yml, so it supports all keys from a Compose build block. See build below.

constraints

No

See below

Hardware requirements for execution. See constraints.

retry_policy

No

See below

Failure recovery rules. See retry_policy.

event_delivery

No

See below

Event publishing configuration. See event_delivery.

gyoza_op_file

No

main.py

Path to the Python file containing the @gyoza_op function, relative to the project root.

deploy

No

See below

Server connection settings for gyoza deploy. See deploy.

build#

Passed as-is to Docker Compose. The most common keys:

Field

Required

Default

Description

context

Yes

Path to the build context (usually .).

dockerfile

Yes

Path to the Dockerfile, relative to the context.

args

No

{}

Build-time variables injected as Docker ARG values. Supports ${ENV_VAR:-default} substitution.

All other keys supported by the Docker Compose build block are also accepted.

constraints#

Field

Required

Default

Description

cpu

No

null

Number of CPU cores required.

ram_mb

No

null

RAM in megabytes.

vram_mb

No

null

GPU VRAM in megabytes. Set to 0 for CPU-only ops.

retry_policy#

Field

Required

Default

Description

max_attempts

No

1

Maximum number of execution attempts in case of failure (including the first).

backoff_ms

No

0

Milliseconds to wait between consecutive retry attempts.

event_delivery#

Field

Required

Default

Description

topic

No

""

Topic name to publish run-state events to.

attributes

No

{}

Key-value metadata attached to every emitted event.

deploy#

Required only when using gyoza deploy. If omitted, gyoza reads the server URL and token from the GYOZA_SERVER_URL and GYOZA_API_KEY environment variables instead.

Field

Required

Default

Description

gyoza_server_base_url

Yes

Base URL of the gyoza server.

gyoza_server_auth_token

No

""

API authentication token.