Environment variables for Jobs
We have introduced support for environment variables for the Jobs that you run on Qubernetes. Environment variables can be set in the .env.q8s
file that should be placed in the root directory of the workspace.
.env.q8s
export KEY=VALUE
They are available in the Jobs as regular environment variables and can be accessed in Jupyter cells or Python scripts using the os.environ
dictionary. For example, the following Python script prints the value of the KEY
environment variable:
import os
print(os.environ['KEY'], None)