Defining your own requirements
In addition to using the installed set of Python libraries, you can specify the libraries by
including a requirements.txt file in the
.zip file. This option is supported for Python version
3.12. Currently, only libraries from the public PyPi
repository are
allowed.
For security purposes, the requirements.txt file must include hashes. The
file is audited using pip-audit
and checked against a safe list of
allowed libraries and versions.
There are a few Python tools available to generate a requirements file with hashes.
One tool is provided by the pip-tools
library. To ensure
consistency, we recommend you install pip-tools
and
pip-audit
when developing the algorithm.
Running custom algorithms depends on gunicorn
(version 23.0.0) and
flask
(version 3.0.3) libraries. These library versions are
installed after processing the specified requirements.
The command lines shown in the steps are examples. Your environment may be different.