https://github.com/thoth-station/s2i-example
An example of Thoth's recommendations in OpenShift's s2i builds for a TensorFlow stack
https://github.com/thoth-station/s2i-example
example-project hacktoberfest openshift s2i s2i-python software-stack tensorflow tensorflow-examples thoth
Last synced: about 1 year ago
JSON representation
An example of Thoth's recommendations in OpenShift's s2i builds for a TensorFlow stack
- Host: GitHub
- URL: https://github.com/thoth-station/s2i-example
- Owner: thoth-station
- License: gpl-3.0
- Created: 2019-07-31T06:16:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-29T22:01:11.000Z (about 3 years ago)
- Last Synced: 2025-03-24T13:51:23.911Z (over 1 year ago)
- Topics: example-project, hacktoberfest, openshift, s2i, s2i-python, software-stack, tensorflow, tensorflow-examples, thoth
- Language: Python
- Size: 89.8 KB
- Stars: 3
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Thoth's TensorFlow stack guidance example
-----------------------------------------
**See different branches for different examples**
This is an example of an application which uses Thoth's recommendations to
recommend a TensorFlow stack for a specific hardware. The application is
showing a generic approach how to integrate inside OpenShift's s2i build
process.
For CLI (Command Line Interface) examples, visit `thoth-station/cli-examples
`__ repository.
OpenShift s2i - Source-To-Image
===============================
To have recommendations suited for your specific hardware, you need to
configure the build to be done on a the hardware where the application is
supposed to be run (specific node placement for build and application run which
should match). This helps to explore available hardware during the application
build. Hardware information together with the environment configuration (base
container image) are subsequently sent to Thoth's recommendation engine to
perform resolving of TensorFlow's dependencies.
To deploy this application to OpenShift:
.. code-block:: console
oc project
oc process -f https://raw.githubusercontent.com/thoth-station/s2i-example/master/openshift.yaml | oc apply -f -
The BuildConfig is using UBI 8 Python 3.6 as a base for the application.
Once the templates get applied, a build is started. As the build is configured
to ask Thoth for advises, Thoth is contacted (see ``thoth_conf_template.yaml``
configuration file for info on configuration options).
Thoth computes recommendations and gives back a ``Pipfile.lock`` with
additional guidance on software stack (see build logs). Note that computing
recommendations takes some time, there is assigned a certain amount of CPU
based on Thoth's backend configuration. Results are cached (3 hours by default)
so next builds for the same stack and same software/hardware configuration are
faster (unless forced or any configuration change on client side).
To remove this application from OpenShift:
.. code-block:: console
oc delete all --selector 'app=s2i-example-tensorflow'
Adjusting configuration options
###############################
See comments in the BuildConfig available in the repo as well as
`thoth-station/s2i-thoth `_ for
more info. The repo stated also provides a list of Thoth's base images with
configuration options you can supply.
Follow instructions present in `Thamos repository
`_
for more info on how to configure Thoth's client - "Thamos".
See also build config present in this repo to see configuration options
supplied to this s2i based Python application.