Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Automatically Importing Requirements into a ModelOp Runtime

When In certain situations, the infrastructure/security team allows for dynamic installations of libraries/packages on a model-specific basis within the ModelOp runtime. ModelOp Center allows a user to define the specific dependent library/package requirements in a requirements.txt file, and will automatically install those designated libraries from an internal or external package repository on deployment of a model.

To make use of this feature:

  • Pre-requisites: ensure that pip install is enabled for containers within the orchestration environment that ModelOp runs. This pip install can refer to library locations internally (e.g. an internal artifactory repository) or to external locations (e.g. PyPI).

  • Create a requirements.txt file in the industry-standard format to list dependent libraries and the specific versions

  • Upon registration of the model, ModelOp Center will automatically assign the role of ‘Required libraries’ to model assets named requirements.txt. However, the user may update any asset with the role.

  • During deployment of a model to a ModelOp runtime, if a model contains an asset with the ‘Required libraries’ role, the ModelOp Runtime will attempt to install the libraries described therein.

    • This feature is currently only supported for python models, and the format of the asset must be that of a typical requirements.txt file.

...

    • The Runtime will attempt to install the libraries indicated by the contents of each required libraries asset before running the model code.

    • Each model execution is done in an isolated environment, so requirements installed for model A will not be present for model B.

Next Article: ModelOp Runtime Details