Integrating with Thoth

Project Thoth can guide you on your software stacks. To consume Thoth’s recommendations, there are multiple ways on how to integrate:

  • Command line interface - Thamos CLI

  • Kebechet (GitHub application)

  • Jupyter Notebooks

  • OpenShift s2i build process

  • Thamos library (not supported yet as API might change)

Pre-requirements for your project

To let Thoth manage your Python application, your application has to use Pipenv to manage virtual environment and application dependencies. Pipenv’s two main files, Pipfile and Pipfile.lock, has to be placed in the root of your Python application directory.

If you use requirements.txt, the easiest way how to convert to Pipenv’s Pipfile and Pipfile.lock is to run the following command:

pipenv install --requirements requirements.txt

And add both file produced, Pipfile and Pipfile.lock, into your Git repository.

Command Line Interface - Thamos CLI

The easiest way how to get recommendations from Thoth service is to install Thamos (Thoth’s CLI and library):

pip3 install -U thamos

And configure your project to use Thoth’s recommendations and ask for them:

cd your/project/path
thamos config
thamos advise

Before you ask for an advise, make sure your Pipenv’s files Pipfile and optionally Pipfile.lock are present in the root directory of your project:

ls -la your/project/path
..
.thoth.yaml
..
Pipfile
Pipfile.lock
..

Kebechet - GitHub application

TODO: write a summary

OpenShift Python s2i build process

Thoth can be used in OpenShift’s s2i process where it can produce recommendations targetting your specific hardware configuration you use to run your application inside the cluster (e.g. specific GPU available in the cluster).

You can find a list of base images which you can use with Thoth in s2i-thoth repository with detailed instructions on how to use Thoth in the OpenShift’s s2i process.

An example of such application can be found on GitHub - s2i TensorFlow example.

Jupyter Notebooks

TODO: write a summary