Edit Environment definition

You can change the behavior and/or content of an Environment by editing the Dockerfile instructions.

Order of script execution

Scripts in an Environment are executed in the following order:

  1. Pre Setup scripts

  2. requirements.txt

  3. Post Setup scripts

  4. Pre Run scripts

  5. 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.

Edit Environment definitions

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.
  1. In the navigation pane, click Environments.

  2. Click the name of an Environment.

  3. On the Overview tab, you can modify the description or visibility.

  4. 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.

  5. In Revision History, enter a short description about the changes to the Environment.

  6. Click Build.