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] [--max-request-size MAX_REQUEST_SIZE]
Mosec Server Configurations
options:
-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_38f936b5)
--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 the provided warmup examples
(if any). This will start one worker per stage
(ignoring the configured number), run the warmup
example through all the stages, and report per-stage
metrics. Install `torch` and `pynvml` to collect GPU
memory metrics. (default: False)
--compression Enable `zstd` & `gzip` compression for the request &
response (default: False)
--max-request-size MAX_REQUEST_SIZE
Maximum request body size in bytes. Requests larger
than this will be rejected with status 413 (default:
10485760)
The following arguments can be set through environment variables: (path,
capacity, timeout, address, port, namespace, debug, log_level, dry_run,
max_request_size). Note that the environment variable should start with
`MOSEC_` with upper case. For example: `MOSEC_PORT=8080 MOSEC_TIMEOUT=5000
python main.py`.