#
Environment VariablesJina uses environment variables to determine different behaviours. To see all supported environment variables and their current values, run:
jina -vf
If you use containerized Executors (including Kubernetes and Docker Compose), you can pass separate environment variables to each Executor in the following way:
jtype: Flow
with: {}
executors:
- name: executor0
port: 49583
env:
JINA_LOG_LEVEL: DEBUG
MYSECRET: ${{ ENV.MYSECRET }}
- name: executor1
port: 62156
env:
JINA_LOG_LEVEL: INFO
CUDA_VISIBLE_DEVICES: 1
jtype: Deployment
with:
name: executor0
port: 49583
env:
JINA_LOG_LEVEL: DEBUG
MYSECRET: ${{ ENV.MYSECRET }}
from jina import Flow
import os
secret = os.environ['MYSECRET']
f = (
Flow()
.add(env={'JINA_LOG_LEVEL': 'DEBUG', 'MYSECRET': secret})
.add(env={'JINA_LOG_LEVEL': 'INFO', 'CUDA_VISIBLE_DEVICES': 1})
)
f.save_config("envflow.yml")
The following environment variables are used internally in Jina:
Environment variable |
Description |
---|---|
|
Authentication token of Jina Cloud |
|
Default host where server is exposed |
|
Default timeout time used by Flow to check readiness of Executors |
|
Name of deployment, used by Head Runtime in Kubernetes to connect to different deployments |
|
If set, Jina will not use uvloop event loop for concurrent execution |
|
If set, all CLI options will be shown in help |
|
Used when exporting a Flow to Kubernetes or Docker Compose to override default gateway image |
|
Set by gRPC service to keep track of received bytes |
|
Set by gRPC service to keep track of sent bytes |
|
Configures access modes for |
|
Configures capacity for |
|
Configures storage class for |
|
Root folder where file locks for concurrent Executor initialization |
|
Configuration used for logger |
|
Logging level used: INFO, DEBUG, WARNING |
|
If set, disables color from rich console |
|
Sets multiprocessing start method used by Jina |
|
If set, disables telemetry |
|
Maximum port number used when selecting random ports to apply for Executors or Gateway |
|
Minimum port number used when selecting random ports to apply for Executors or Gateway |
|
Jina uses this variable to inject |