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, clangformat, clangtidy, 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 [-n NAME] [-h]

Options

-n, --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] [-d DIR] [-c] [-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

-d, --dir

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

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

-c, --clean

clean prior to building

Default: False

-r, --regen

Delete the CMakeCache and regenerate

Default: False

-t, --threads

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

Default: 12

clangformat

This is a wrapper around clangformat to format a particular file in place based on the existing clangformat rules. Any unmatched arguments are passed to clang-format. Use clang-format –help to see options

proteus clangformat [-h] path

Positional Arguments

path

Path to a C++ file to analyze

clangtidy

Run clang-tidy on all source files

proteus clangtidy [-d DIR] [-h]

Options

-d, --dir

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

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

clean

Delete all generated files, restoring the repo to clean state

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

Options

--artifacts

Delete downloaded XModel artifacts

Default: False

--no-gui

Don’t clean web GUI/nodeJS related files

Default: True

dockerize

Build a docker image

proteus dockerize [--build-meta BUILD_META] [-h] [--nightly] [--production] [--push] [--registry REGISTRY]

Options

--build-meta

Add a build string to the version.

--nightly

Build a nightly tagged image. Defaults to false

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”

get

Get artifacts such as XModels

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] [images]

Positional Arguments

images

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: 12

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 [--devices] [-h] [-p PROFILE] [--registry REGISTRY] [-v VERSION] [--write-only]

Options

--devices, --no-devices

Pass devices from host to container, if they exist. Defaults to true

Default: True

-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”

-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