Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 2.88 KB

overview.rst

File metadata and controls

85 lines (61 loc) · 2.88 KB

Morpheus CLI Overview

This section focuses on the Morpheus CLI and illustrates how the CLI can be used to configure and run a Morpheus Pipeline.

Organization

The Morpheus CLI is built on the Click Python package which allows for nested commands and chaining multiple commands together. At a high level, the CLI is broken up into two main sections:

  • run
    • For running NLP or FIL pipelines.
  • tools
    • Tools/Utilities to help set up, configure and run pipelines and external resources

Users can get help on any command by passing --help to a command or sub-command. For example, to get help on the tools:

$ morpheus tools --help
Usage: morpheus tools [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.  [default: False]

Commands:
  autocomplete  Utility for installing/updating/removing shell completion for
                Morpheus
  onnx-to-trt   Converts an ONNX model to a TRT engine

The help text will show arguments, options and all possible sub-commands. Help for each of these sub-commands can be queried in the same manner:

$ morpheus tools onnx-to-trt --help
Usage: morpheus tools onnx-to-trt [OPTIONS]

Options:
  --input_model PATH              [required]
  --output_model PATH             [required]
  --batches <INTEGER INTEGER>...  [required]
  --seq_length INTEGER            [required]
  --max_workspace_size INTEGER    [default: 16000]
  --help                          Show this message and exit.  [default:
                                  False]

AutoComplete

The Morpheus CLI supports bash, fish, zsh, and powershell autocompletion. To set up autocomplete, it must first be installed. Morpheus comes with a tool to assist with this:

$ morpheus tools autocomplete install
bash completion installed in ~/.bash_completion
$ source ~/.bash_completion

After autocomplete has been installed, [TAB] can be used to show all commands, options and arguments when building pipelines via the CLI:

$ morpheus run pipeline- # [TAB][TAB]
pipeline-fil  pipeline-nlp