Domino allows users to set environment variables at four levels: Compute Environments, Projects, Models, and User. These variables help configure how the system runs and manage secrets or settings across different areas.
-
Compute Environment variables provide user, project, and hardware information. These are set at the environment level and used for new revisions.
-
Project Environment variables are set at the project level and shared with all project collaborators. They help with configurations specific to the project and ensure consistency in all runs within that project.
-
Model Level variables are used for deployed models. They help manage settings needed for running the model, like API keys or endpoints for external services.
-
User Level variables are specific to each user and apply to all projects and tasks they start. They are helpful for personal settings like login details or default preferences.
You can create your own or use Domino’s environment variables to add values to your runs. These variables must start with letters and can only include letters, numbers, and underscores.
You can use the same variable in different places. When Domino loads a run or workspace, it pulls environment variables from these sources in this order:
-
Compute Environment variables
-
Project environment variables
-
User Level variables
Here is an example of the expected run results with the same variable in multiple places:
Place set | Run #1 | Run #2 | Run #3 |
---|---|---|---|
Compute Environment | A | A | A |
Project | - | B | B |
User Account | - | - | C |
Run Result | A | B | C |
Domino uses specific environment variables to configure and manage operations. These variables should not be defined at the user or project level. Here are a few generic ones:
-
USER
-
LOGNAME
-
MLFLOW_TRACKING_URI
In addition to the above, any variable that starts with the following is reserved:
-
DOMINO_*
-
KUBERNETES_*
-
NEW_RELIC_*
-
DATA_PLANE_*
-
MINICONDA_*
-
FLYTE_*
-
HEPHAESTUS_*
-
SELDON_*
-
CONDA_*
-
DISTRIBUTED_COMPUTE_*
We recommend using a common prefix, such as YOUR_COMPANY NAME_, for all custom environment variables to avoid collisions with Domino environment variables.
-
The Default Domino Variables glossary contains details about variables automatically injected by Domino.
-
Set up user environment variables for each user. The system injects these variables at execution time for any run initiated by that user.
-
Learn to build project variables to add, modify, or delete environment variables for your projects.
-
Learn to create model variables to add, modify, or delete variables for your models.