You can customize an environment to enable tools, run scripts, or manage environment variables. You may need to be an administrator to edit an existing environment.
-
Click Customize before Building if you just created an Environment and want to enable tools, run scripts, or manage environment variables.
-
To edit an existing Environment, go to Govern > Environments in the navigation pane and click the name of an Environment. Then click Edit Definition.
Domino runs setup scripts before and after running the requirements.txt
file. The scripts within an environment are executed in the following order:
-
First, it executes pre-setup scripts.
-
Next, it installs packages from the
requirements.txt
file. -
Then Domino runs post-setup and pre-run scripts.
-
Post-run scripts are executed after your Workspace, Job, or App is stopped.
However, no scripts are run before or after tasks in a distributed compute cluster environment, such as Spark, Ray, Dask, or MPI.
Before you add items to these scripts and the requirements.txt
file, think about whether similar instructions should be included directly in the environment’s Dockerfile.
This can make it faster to start workspaces, jobs, and other tasks using the environment because the necessary work is already included in the Docker image.
You can start by going to Govern > Environments and selecting the environment you want to define from the list. Then click Edit Definition.
On the Overview tab, you can update the Description or change the environment’s Visibility. You won’t be able to change the Environment Base or Supported Cluster Settings.
Dockerfile instructions
Enter your Dockerfile layers. Some things to remember:
-
Exclude the
FROM
statement. -
Commands can be run as root or other user available in the base image.
-
Docker can’t access your project files or user environment variables when building.
-
There is a limit of 127 layers.
Docker’s official site has more detailed information about Docker.
Pluggable workspace tools
Enter the interactive tools needed by any Project that uses this Environment. Add Workspace IDEs has more information about interactive tools.
Run setup scripts
Enter the bash
code that is executed at runtime. Domino executes these commands at runtime and runs them as root.
-
Pre Run Script: Enter commands to execute before the Python packages in your Project’s `requirements.txt`are installed.
-
Post Run Script: Enter commands to execute after your Workspace/Job/App is stopped.
Advanced
In the advanced section, enter the bash
code executed at a specified step in your experiment’s lifecycle.
-
Pre Run Script: Enter commands to execute before installing Python packages in your Project’s
requirements.txt
. -
Post Run Script: Enter commands to execute after the Python packages in your Project’s
requirements.txt
are installed -
Enable VPN Networking: Select this if a VPN is to be used for that environment.
-
Use Domino’s environment variables to store keys and credentials or to inject values into your runs.
-
Create a Domino Environment using an existing environment or start from a custom setup.
-
Set default Environments establishes a starting point for all new projects or an environment for a specific project.