build
Options
TEXT
Directory for the Docker build context. Defaults to a temp dir removed after the build.
TEXT
Enable a persistent apt/pip/uv build cache keyed by this id.
TEXT
default:"."
Model directory.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Run the image’s container as root instead of the default non-root user.
TEXT
Image tag. Defaults to ‘
model_name:latest’ from config.yaml.TEXT
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘—truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with —truss-executable.
BOOL
Enable verbose logging
Examples
Build the current directory into a local Docker imageFilter output with --jq
Print the built image ID
Output
Text mode (--output text): Build progress from truss and docker is streamed to stderr. On success a one-line summary is printed to stdout.
JSON mode (--output json): payload type cmd.ModelImageBuildResult.
Under —output json, stdout is the {image_id, tag} result. image_id is empty when it cannot be resolved (e.g. a custom buildx builder that does not write the iidfile).
prepare
build-dir’.
Options
TEXT
required
Directory for the Docker build context. Created if absent and kept.
TEXT
Enable a persistent apt/pip/uv build cache keyed by this id.
TEXT
default:"."
Model directory.
TEXT
Filter JSON output with a jq expression; implies —output json (or jsonl for streamed commands)
TEXT
default:"text"
Output formatOne of:
text, json, jsonl, noneTEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
BOOL
Run the image’s container as root instead of the default non-root user.
TEXT
Run this truss executable instead of fetching one with uv, e.g. a virtualenv’s bin/truss. A value with no path separator is looked up on PATH, so ‘—truss-executable truss’ runs the truss you installed. Defaults to BASETEN_TRUSS_EXECUTABLE.
TEXT
Version of truss to fetch and run with ‘uv tool run’, e.g. 0.18.26. Defaults to BASETEN_TRUSS_VERSION, or the latest release. Mutually exclusive with —truss-executable.
BOOL
Enable verbose logging
Examples
Write the current directory’s build context to ./ctxFilter output with --jq
Print the generated Dockerfile path
Output
Text mode (--output text): Progress from truss is streamed to stderr. On success a one-line summary is printed to stdout.
JSON mode (--output json): payload type cmd.ModelImagePrepareResult.
Under —output json, stdout is the {build_dir, dockerfile} result with absolute paths.