domino logo
Latest (5.6)
  • Tech Ecosystem
  • Get Started
  • Domino Cloud
  • Code Assist
  • Collaborate
  • Projects
  • Work with Data
  • Workspaces
  • Environments
  • Executions
  • Deploy Models and Apps
  • Model Monitoring
  • Organizations
  • Security and Credentials
  • Notifications
  • Download the Audit Log
  • Data Planes
  • Search Your Domino Deployment
  • Domino CLI
  • Troubleshooting
  • Get Help
  • Send Feedback
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Executions
>
Domino Environment Variables

Domino Environment Variables

Domino automatically injects the following environment variables whenever it runs your code, as part of the context of your run.

  • DOMINO_USER_API_KEY — Use this to use the Domino API to access another project.

  • DOMINO_API_HOST — Use this to use the Domino API to access another project.

  • DOMINO_PROJECT_OWNER — Username of the owner of the running project.

  • DOMINO_PROJECT_NAME — Name of the running project.

  • DOMINO_RUN_ID — Run ID of the current run.

  • DOMINO_RUN_NUMBER — Run number of the current run.

  • DOMINO_HARDWARE_TIER_ID - Hardware tier the current run is executing on (new in v1.42).

  • DOMINO_STARTING_USERNAME - Username of the user who began the run (new in v1.43).

  • DOMINO_WORKING_DIR - Working directory for the running project.

  • AWS_SHARED_CREDENTIALS_FILE - Path to your AWS credential file to connect to additional AWS resources (for example, S3, Redshift). See AWS credential propagation.

  • DOMINO_TOKEN_FILE - Path to a JWT token signed by Domino to authenticate with the Domino API or other third-party services. Use a Token for Authentication.

Note

You can use these to programmatically determine if your code is running in Domino or not. This is useful if your code might do something different when it runs locally as opposed to when it is runs on Domino.

These variables are also useful when you generate artifacts or outputs. For example, you might produce a report that refers to the run number.

The following are examples to retrieve an environment variable within your code:

Sys.getenv("DOMINO_RUN_ID")

If you want to define your own environment variables, see Secure Credential Storage.

In addition to the variables above, Domino sets some environment variables used to configure runs. They should not be defined as user or project-level environment variables. Here are some examples:

  • USER

  • DOMINO_* (Any variable that starts with DOMINO, e.g., DOMINO_NODE)

  • LOGNAME

  • MLFLOW_TRACKING_URI

To avoid collisions with Domino environment variables, we recommend using a common prefix like GOOGLE_ for all custom environment variables. Failing to do so may lead to unexpected behavior.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.