Customizing environment definitions

As Admin or Editor of a project, you can change the name, the description, and the hardware configuration of an environment definition that you created. You cannot change the language of an existing environment definition.

If certain libraries are not included in the standard collection of pre-installed libaries and packages, you can customize the software configuration and add your own custom libraries or additional packages. You can change the software customization that you made at any time, or remove it completely.

Currently, you can only customize the software configuration of a standard default environment definition that you created. You can’t customize the software configuration of a Spark or a GPU environment definition you created.

To customize an environment definition you created:

  1. Click your project’s Environments tab.
  2. In the Active environment runtimes section, check that no runtime is active for the environment definition you want to change.
  3. In the Environment definitions section, click the environment definition you want to customize.
  4. Add your changes. For a default environment definition, you can create a customization and enter the packages you want to add to the standard preinstalled. You can also upgrade or downgrade packages that are part of the standard software configuration. The libraries that are added to an environment definition through the customization aren’t persisted; however, they are preinstalled each time the environment runtime is started.

    You can use the provided template to add libraries. There is a different template for Python and for R. The following example shows you how to add Python packages:

     # Please add conda channels here
     channels:
     - defaults
    
     # Please add conda packages here
     dependencies:
     - scikit-image=0.15
    
     # Please add pip packages here
     - pip:
      - seawater==3.3.4
    

    Note:

    • If you can get a package either through conda from the default channels or through pip from PyPI, the preferred method is through conda from the default channels.
    • When you specify a package version, use a single = for conda packages and == for pip packages. If you don’t specify a version, the package manager mìght pick the latest version available, or keep the pre-installed version of the package.
    • Before you customize a package, you should check whether the changes you are asked to make are in fact required because conda can report the changes for installing a given package without actually having installed the package. You can do this from your notebook.
      • For Python: !conda install --dry-run spacy=2.0.16
      • For R: print(system2("conda", args="install --dry-run spacy=2.0.16", stdout=TRUE))

      Although pip does install the package, you can discard any changes that were made when you restart the runtime from your notebook. For Python: !pip install spacy

    • You cannot add arbitrary notebook extensions as a customization because notebook extensions must be preinstalled. The only notebook extensions which can be enabled are the Esri ArcGIS extension and its prerequisites. When you create a runtime environment definition with the Python 3.6 software configuration, you can select to enable Esri ArcGIS. Note that you can only use the preinstalled version.
  5. Apply your changes.

Learn more

Installing custom Python packages