You can change the behavior and/or content of an Environment by editing the Dockerfile instructions.
Scripts in an Environment are executed in the following order:
-
Pre Setup scripts
-
requirements.txt
-
Post Setup scripts
-
Pre Run scripts
-
Post Run scripts (after the Workspace/Job/App has been stopped)
Note
| None of the pre/post scripts are executed for a distributed compute cluster environment (Spark/Ray/Dask/MPI). |
Warning
|
Before every execution, packages are installed from requirements.txt and the pre-setup, post-setup, and pre-run scripts are executed.
Before adding to these scripts and requirements.txt , consider whether equivalent instructions can be included in the Environment’s Dockerfile.
This will speed up startup for Workspaces, Jobs, and other executions using the Environment, as the work will already be integrated into the Docker image.
|
You can modify an Environment by editing its Dockerfile instructions.
Note
|
If com.cerebro.domino.Environments.canNonSysAdminsCreateEnvironments is false , you need to be an administrator to edit an Environment.
|
-
In the navigation pane, click Environments.
-
Click the name of an Environment.
-
On the Overview tab, you can modify the description or visibility.
-
Click Edit Definition to define the Dockerfile and supporting scripts and settings for the Environment. Each time you save changes, the Environment’s revision increments by one and your Domino deployment rebuilds the Environment and pushes it to the local Docker registry.
- Overview
-
Modify the Environment description and set its visibility settings.
- Dockerfile instructions
-
Enter your Dockerfile layers. See Docker’s official site.
- Pluggable Workspace Tools
-
Enter the interactive tools needed by any Project that uses this Environment. See Add Workspace IDEs.
- Run Setup Scripts
-
Enter 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 after 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.
- Environment variables
-
Set the Variable Names and their Values.
- Advanced
-
In the advanced section, enter bash code that is executed at a specified step in your experiment’s lifecycle.
-
Pre Setup Script, enter commands to execute before the Python packages in your Project’s
requirements.txt
are installed. -
Post Setup Script, enter commands to execute after the Python packages in the
requirements.txt
of your Project are installed.
-
In Docker Arguments, enter arguments, separated by newlines, to pass to the underlying
docker run
command. Typically, you don’t have to modify this. -
In Revision History, enter a short description about the changes to the Environment.
-
Click Build.