Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.baseten.co/llms.txt

Use this file to discover all available pages before exploring further.

truss image [OPTIONS] COMMAND [ARGS]...
Build and manage Docker images for your Truss.

build

Build the Docker image for a Truss.
truss image build [OPTIONS] [TARGET_DIRECTORY] [BUILD_DIR]

Options

}
--tag
TEXT
Docker image tag.
--use_host_network
Use the host network for the Docker build.
--log
humanfriendly | W | WARNING | I | INFO | D | DEBUG
default:"humanfriendly"
Logging verbosity. humanfriendly (default) is pretty-printed; INFO, DEBUG, WARNING produce structured logs.
--non-interactive
Disable interactive prompts. Use in CI/automated contexts where stdin isn’t a TTY.

Arguments

TARGET_DIRECTORY
TEXT
A Truss directory. Defaults to current directory.
BUILD_DIR
TEXT
Image context directory. If not provided, a temp directory is created.
Example: Build a Docker image for your Truss:
truss image build
Build with a custom tag:
truss image build --tag my-model:v1

build-context

Create a Docker build context for a Truss without building the image.
truss image build-context [OPTIONS] BUILD_DIR [TARGET_DIRECTORY]

Options

}
--log
humanfriendly | W | WARNING | I | INFO | D | DEBUG
default:"humanfriendly"
Logging verbosity. humanfriendly (default) is pretty-printed; INFO, DEBUG, WARNING produce structured logs.
--non-interactive
Disable interactive prompts. Use in CI/automated contexts where stdin isn’t a TTY.

Arguments

BUILD_DIR
TEXT
required
Directory where image context is created.
TARGET_DIRECTORY
TEXT
A Truss directory. Defaults to current directory.
Example: Create a build context in a specific directory:
truss image build-context ./build-context

run

Run the Docker image for a Truss locally.
truss image run [OPTIONS] [TARGET_DIRECTORY] [BUILD_DIR]

Options

}
--tag
TEXT
Docker image tag to run.
--port
INTEGER
default:"8080"
Local port to expose the model on.
--attach
Attach to the container process.
--use_host_network
Use the host network for the Docker build and run.
--log
humanfriendly | W | WARNING | I | INFO | D | DEBUG
default:"humanfriendly"
Logging verbosity. humanfriendly (default) is pretty-printed; INFO, DEBUG, WARNING produce structured logs.
--non-interactive
Disable interactive prompts. Use in CI/automated contexts where stdin isn’t a TTY.

Arguments

TARGET_DIRECTORY
TEXT
A Truss directory. Defaults to current directory.
BUILD_DIR
TEXT
Image context directory. If not provided, a temp directory is created.
Example: Build and run a Truss locally:
truss image run
Run on a custom port:
truss image run --port 9000
Run in attached mode:
truss image run --attach