Skip to main content

Dependency management

stay Serving Predictor It introduces the pre installed dependencies in various modes. If additional dependencies need to be installed. You can configure it in the following way. The corresponding dependencies will be installed before the deployment service starts.

PyPI rely on

If there is a file named in the root directory of the model deployment folder requirements.txt The file. HyperAI Model deployment will be executed before startup pip install -r requirements.txt command, Install the declared PyPI library.

Conda rely on

HyperAI Model deployment is also supported Conda Installation of the package. Before starting the deployment service, it will search for the name in the root directory of the deployment directory conda-packages.txt The file. Its file format follows

[channel::]package[=version[=buildid]]

Here is an example:

conda-packages.txt
conda-forge::rdkit
conda-forge::pygpu

If requirements.txt and conda-packages.txt Simultaneously existing. So we will install it first conda-packages.txt Dependence within. Then install it again requirements.txt Dependence within.

Other dependencies

For non Conda and PyPI The dependence. You can provide a name in the root directory called dependencies.sh The file. At the start of model deployment, it will be bash implement. And its execution will be earlier than requirements.txt and conda-packages.txt Dependent installation.

Here is an installation provided tree Examples of Applications:

dependencies.sh:

apt update && apt install tree -y