jina pea
¶
Note
This command is hidden unless you set JINA_FULL_CLI
Start a Jina pea. You should rarely use this directly unless you are doing low-level orchestration
usage: jina pea [-h] [--name] [--log-config] [--show-exc-info] [--port-ctrl]
[--ctrl-with-ipc] [--timeout-ctrl] [--ssh-server]
[--ssh-keyfile] [--ssh-password] [--uses]
[--py-modules [PATH [PATH ...]]] [--port-in] [--port-out]
[--host-in] [--host-out]
[--socket-in {PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT ... 8 more choices}]
[--socket-out {PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT ... 8 more choices}]
[--max-socket-retries] [--dump-interval] [--read-only]
[--separated-workspace] [--memory-hwm]
[--skip-on-error {NONE, EXECUTOR, HANDLE}] [--uses-internal]
[--entrypoint] [--pull-latest] [--volumes [DIR [DIR ...]]]
[--host] [--port-expose] [--daemon]
[--runtime-backend {THREAD, PROCESS}]
[--runtime-cls {GRPCRuntime, RESTRuntime, ContainerRuntime, JinadRuntime ... 2 more choices}]
[--timeout-ready] [--env [KEY=VALUE [KEY=VALUE ...]]]
[--expose-public]
Essential arguments¶
- --name
the name of this Pea, used to identify the pea/pod and its logs.
- --log-config
the yaml config of the logger. note the executor inside will inherit this log config
Default: “/home/runner/work/jina/jina/jina/resources/logging.default.yml”
- --show-exc-info
if true then exception stack information to be added to the logging message, useful in debugging
Default: False
ZMQRuntime arguments¶
- --port-ctrl
port for controlling the runtime, default a random port between [49152, 65535]
Default: 40825
- --ctrl-with-ipc
use ipc protocol for control socket
Default: False
- --timeout-ctrl
timeout (ms) of the control request, -1 for waiting forever
Default: 5000
- --ssh-server
the SSH server through which the tunnel will be created, can actually be a fully specified “user@server:port” ssh url.
- --ssh-keyfile
this specifies a key to be used in ssh login, default None. regular default ssh keys will be used without specifying this argument.
- --ssh-password
ssh password to the ssh server.
ZEDRuntime arguments¶
- --uses
the config of the executor, it could be > a YAML file path, > an executor’s class name, > a docker image (must start with docker://)> one of “_pass”, “_logforward” > the raw content of YAML config (must starts with “!”)
Default: “_pass”
- --py-modules
the customized python modules need to be imported before loading the executor
- --port-in
port for input data, default a random port between [49152, 65535]
Default: 33525
- --port-out
port for output data, default a random port between [49152, 65535]
Default: 34103
- --host-in
host address for input, by default it is 0.0.0.0
Default: “0.0.0.0”
- --host-out
host address for output, by default it is 0.0.0.0
Default: “0.0.0.0”
- --socket-in
Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT, ROUTER_BIND, DEALER_CONNECT
socket type for input port
Default: 0
- --socket-out
Possible choices: PULL_BIND, PULL_CONNECT, PUSH_BIND, PUSH_CONNECT, SUB_BIND, SUB_CONNECT, PUB_BIND, PUB_CONNECT, PAIR_BIND, PAIR_CONNECT, ROUTER_BIND, DEALER_CONNECT
socket type for output port
Default: 2
- --max-socket-retries
max number of retries when socket is conflict
Default: 3
- --dump-interval
serialize the model in the pod every n seconds if model changes. -1 means –read-only.
Default: 240
- --read-only
do not allow the pod to modify the model, dump_interval will be ignored
Default: False
- --separated-workspace
the data and config files are separated for each pea in this pod, only effective when BasePod’s parallel > 1
Default: False
- --memory-hwm
memory high watermark of this pod in Gigabytes, pod will restart when this is reached. -1 means no restriction
Default: -1
- --skip-on-error
Possible choices: NONE, EXECUTOR, HANDLE
skip strategy on error message.
Default: 0
ContainerRuntime arguments¶
- --uses-internal
The executor config that is passed to the docker image if a docker image is used in uses. It cannot be another docker image
Default: “BaseExecutor”
- --entrypoint
the entrypoint command overrides the ENTRYPOINT in docker image. when not set then the docker image ENTRYPOINT takes effective.
- --pull-latest
pull the latest image before running
Default: False
- --volumes
the path on the host to be mounted inside the container. if separated by “:” the first part will be considered as the local host path and the second part is the path in the container system. If no split provided, then the basename of that directory will be mounted into container’s root path, e.g. –volumes=”/user/test/my-workspace” will be mounted into “/my-workspace” inside the container. all volumes are mounted with read-write mode.
Expose arguments¶
- --host
host address of the runtime, by default it is 0.0.0.0.
Default: “0.0.0.0”
- --port-expose
host port exposed to the public
Default: 50687
Pea arguments¶
- --daemon
the Pea attempts to terminate all of its Runtime child processes/threads on existing. setting it to true basically tell the Pea do not wait on the Runtime when closing
Default: False
- --runtime-backend, --runtime
Possible choices: THREAD, PROCESS
the parallel backend of the runtime inside the pea
Default: 1
- --runtime-cls
Possible choices: GRPCRuntime, RESTRuntime, ContainerRuntime, JinadRuntime, SSHRuntime, ZEDRuntime
the runtime class to run inside the pea
Default: “ZEDRuntime”
- --timeout-ready
timeout (ms) of a pea waits for the runtime to be ready, -1 for waiting forever
Default: 10000
- --env
a map of environment variables that are available inside runtime
- --expose-public
expose the public IP address to remote when necessary, by default it exposesprivate IP address, which only allows accessing under the same network/subnet
Default: False