Command-Line Interface

The proteus script provides an easy way to launch containers and build the Server. The documentation for the options available in this Python script can be seen here or on the terminal using the --help flag.

Proteus helper script

usage: proteus [--dry-run] [-h] [-v] command ...

Commands

command

Possible choices: attach, benchmark, build, clean, dockerize, get, install, list, make, run, start, test, up

Options

--dry-run

print the actual commands that would be run without running them

Default: False

-v, --version

show program’s version number and exit

Sub-commands:

attach

Attach to a running Proteus container

proteus attach [-h] [name]

Options

name

name of the container to attach to. Defaults to latest running container

benchmark

Benchmark Proteus

proteus benchmark

build

Build the proteus project

proteus build [--coverage | --debug | --release] [-a] [-c] [-d DIR] [-l] [-r] [-t THREADS] [-h]

Named Arguments

--coverage

build the coverage configuration

--debug

build the debug configuration

--release

build the release configuration

Options

-a, --all

Build additional optional targets

Default: False

-c, --clean

clean prior to building

Default: False

-d, --dir

root path to place the build tree. Defaults to ./build

Default: “/workspace/proteus/build/Debug/docs/build”

-l, --lint

Enable build-time linting in CMake. Defaults to false

Default: False

-r, --regen

Delete the CMakeCache and regenerate

Default: False

-t, --threads

number of threads for Make (defaults to number of processors)

Default: 64

clean

Delete all generated files, restoring the repo to clean state

proteus clean [--artifacts] [-h] [--no-gui]

Options

--artifacts

Delete downloaded artifacts

Default: False

--no-gui

Don’t clean web GUI/nodeJS related files

Default: True

dockerize

Build a docker image

proteus dockerize [--dev-base DEV_BASE] [-h] [--vitis] [--production] [--push] [--registry REGISTRY] [--tfzendnn_path TFZENDNN_PATH] [--ptzendnn_path PTZENDNN_PATH] [--migraphx] [--suffix SUFFIX]

Options

--dev-base

Name of the image to use as dev image to build the production image.

Default: “”

--vitis

If provided, build with Vitis AI enabled

Default: False

--production

Build the production image. Defaults to false to build the dev image.

Default: False

--push

Push the image(s) to the registry after building.

Default: False

--registry

Docker image registry. Defaults to proteus-user

Default: “proteus-user”

--tfzendnn_path

TF+ZenDNN C++ package location. If provided, will build with TF+ZenDNN enabled

--ptzendnn_path

PT+ZenDNN C++ package location. If provided, will build with PT+ZenDNN enabled

--migraphx

If provided, will build with Migraphx enabled

Default: False

--suffix

String to append to the tag of the Docker image to use. Defaults to empty string

Default: “”

get

Get artifacts (images, videos and models) for examples and tests

proteus get [-h] [-q]

Options

-q, --quiet

suppress prints

Default: False

install

Install Proteus. Any unknown arguments are passed to the build command. Use – –help to see options.

proteus install [-d DIR] [--get-manifest] [-h]

Options

-d, --dir

root path to the build tree. Defaults to /tmp/proteus/build

Default: “/tmp/proteus/build”

--get-manifest

Print the list of files last installed.

Default: False

list

List Proteus containers and images on the host.

proteus list [-h] [type]

Positional Arguments

type

List the active containers (default) or specify ‘images’ or ‘labels’

Default: False

make

This is a wrapper around make for the current build configuration.

proteus make [--dir DIR] [-h] [-j [JOBS]]

Options

--dir

root path to the build tree. Defaults to ./build

Default: “/workspace/proteus/build/Debug/docs/build”

-j

Allow N jobs at once; infinite jobs with no arg. Defaults to number of cores.

Default: 64

run

This is a wrapper around ‘docker run’ with preset options. Any unparsed arguments are directly passed to ‘docker run’. Use ‘docker run –help’ to see the options.

proteus run [--dev | --autotest-dev] [--command COMMAND] [--devices] [-h] [--image IMAGE] [--interactive] [--net-host] [--rm] [--user-config] [--working-dir] [--xclbins]

Presets

Presets define a set of options together for convenience. If additional options are provided, they override those set in the preset.

--dev

Starts the dev container in interactive mode with the working directory mounted.

--autotest-dev

Starts the dev container with the working directory mounted and runs Proteus’s coverage test.

Options

These options may default to a value if a preset is selected.

--command

Override the default CMD of the image. Defaults to None.

--devices, --no-devices

Pass devices from host to container, if they exist

--image

Image to run. Defaults to a value if a preset is used.

--interactive, --no-interactive

Keep STDIN open even if not attached and allocate a pseudo-TTY

--net-host, --no-net-host

Use host networking mode

--rm, --no-rm

Remove container after exiting

--user-config, --no-user-config

Pass the user’s git config and SSH keys to the container, if they exist

--working-dir, --no-working-dir

Mount the current working directory from host to /workspace/proteus on the container

--xclbins, --no-xclbins

Pass /opt/xilinx/overlaybins from host to container, if it exists

start

Start proteus-server with the current build configuration. Unknown arguments are passed to proteus-server.

proteus start [--dir DIR] [-h] [--gdb]

Options

--dir

root path to the build tree. Defaults to ./build

Default: “/workspace/proteus/build/Debug/docs/build”

--gdb

Run server with GDB.

Default: False

test

Run Proteus’s test suite. All arguments are passed to the test script.

proteus test

up

Start docker-compose services

proteus up [-h] [-p PROFILE] [--registry REGISTRY] [--suffix SUFFIX] [-v VERSION] [--write-only]

Options

-p, --profile

profile to run (dev|prod|test|autotest-dev|autotest). Defaults to autotest-dev

Default: “autotest-dev”

--registry

Registry to use for the Docker images. Defaults to proteus-user

Default: “proteus-user”

--suffix

String to append to the tag of the Docker image to use. Defaults to empty string

Default: “”

-v, --version

Version of the Docker images to run. Defaults to latest

Default: “latest”

--write-only

Only generate docker-compose.yml without running it

Default: False