- jina.orchestrate.pods.container.run(args, name, container_name, net_mode, runtime_ctrl_address, envs, is_started, is_shutdown, is_ready)¶
Method to be run in a process that stream logs from a Container
This method is the target for the Pod’s thread or process
run()is running in subprocess/thread, the exception can not be propagated to the main process. Hence, please do not raise any exception here.
Please note that env variables are process-specific. Subprocess inherits envs from the main process. But Subprocess’s envs do NOT affect the main process. It does NOT mess up user local system envs.
Namespace) – namespace args from the Pod
str) – name of the Pod to have proper logging
str) – name to set the Container to
str]) – The network mode where to run the container
str) – The control address of the runtime in the container
Dict) – Dictionary of environment variables to be set in the docker image
Event]) – concurrency event to communicate runtime is properly started. Used for better logging
Event]) – concurrency event to communicate runtime is terminated
Event]) – concurrency event to communicate runtime is ready to receive messages
- class jina.orchestrate.pods.container.ContainerPod(args)¶
ContainerPodstarts a runtime of
BaseRuntimeinside a container. It leverages
multiprocessing.Processto manage the logs and the lifecycle of docker container object in a robust way.
Start the ContainerPod. This method calls
multiprocesssing.Process. .. #noqa: DAR201