Using environment variables to configure endpoint behavior¶
Quick introduction to deployments
Valohai deployments are primarily used for online inference
All deployments are served from a Kubernetes cluster
Each deployment can contain multiple versions, and each version can contain multiple HTTP endpoints
For more details, see Core Concepts: Deployments
You have two ways to introduce environment variables into the deployment endpoint runtime:
Inherit the project’s environment variables and secrets
Define environment variables for a particular deployment version
Then you can read those values with the library of your choice e.g. os.getenv()
in Python.