Command-line interface
Use the Truss package via the command line to package and serve models.
Usage:
truss [OPTIONS] COMMAND [ARGS]
You can always review these commands with
truss --help
, which will print a complete list of commands.Show Truss package version.
Create a docker build context for a Truss.
args
:build_dir
: Folder where image context is built for Trusstarget_directory
: A Truss directory. If none, use current directory.
Builds the docker image for a Truss.
args
:target_directory
: A Truss directory. If none, use current directory.build_dir
: Image context. If none, a temp directory is created.
Clean up truss data.
Truss creates temporary directories for various operations such as for building docker images. This command clears that data to free up disk space.
Get logs in a container is running for a truss
args
:target_directory
: A Truss directory. If none, use current directory.
Initializes an empty Truss directory.
args
:target_directory
: A Truss is created in this directory
Kills containers related to truss.
args
:target_directory
: A Truss directory. If none, use current directory.
Kills all truss containers that are not manually persisted
Invokes the packaged model, either locally or in a Docker container.
args
:target_directory
: A Truss directory. If none, use current directory.request
: String formatted as json that represents requestbuild_dir
: Directory where context is built. If none, a temp directory is created.tag
: Docker build image tag.port
: Local port used to run image.use_docker
: Flag to run prediction on Docker, defaults toFalse
.request_file
: Path to json file containing the request.
Runs examples specified in the Truss, over docker.
args
:target_directory
: A Truss directory. If none, use current directory.
Runs the docker image for a Truss.
args
:target_directory
: A Truss directory. If none, use current directory.build_dir
: Image context. If none, a temp directory is created.
Last modified 4mo ago