CLI ArgumentsΒΆ

python echo.py --help
usage: echo.py [-h] [--path PATH] [--capacity CAPACITY] [--timeout TIMEOUT]
               [--wait WAIT] [--address ADDRESS] [--port PORT]
               [--namespace NAMESPACE] [--debug]
               [--log-level {debug,info,warning,error}] [--dry-run]
               [--compression]

Mosec Server Configurations

optional arguments:
  -h, --help            show this help message and exit
  --path PATH           Unix Domain Socket address for internal Inter-Process
                        Communication.If not set, a random path will be
                        created under the temporary dir. (default:
                        /tmp/mosec_9ce846a7)
  --capacity CAPACITY   Capacity of the request queue, beyond which new
                        requests will be rejected with status 429 (default:
                        1024)
  --timeout TIMEOUT     Service timeout for one request (milliseconds)
                        (default: 3000)
  --wait WAIT           [deprecated] Wait time for the batcher to batch
                        (milliseconds) (default: 10)
  --address ADDRESS     Address of the HTTP service (default: 0.0.0.0)
  --port PORT           Port of the HTTP service (default: 8000)
  --namespace NAMESPACE
                        Namespace for prometheus metrics (default:
                        mosec_service)
  --debug               Enable the service debug log (default: False)
  --log-level {debug,info,warning,error}
                        Configure the service log level (default: info)
  --dry-run             Dry run the service with provided warmup examples (if
                        any). This will omit the worker number for each stage.
                        (default: False)
  --compression         Enable `zstd` & `gzip` compression for the request &
                        response (default: False)

The following arguments can be set through environment variables: (path,
capacity, timeout, address, port, namespace, debug, log_level, dry_run). Note
that the environment variable should start with `MOSEC_` with upper case. For
example: `MOSEC_PORT=8080 MOSEC_TIMEOUT=5000 python main.py`.