Code Monkey home page Code Monkey logo

s2i-example's Introduction

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:

oc project <YOUR-PROJECT-NAME>
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:

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.

s2i-example's People

Contributors

fridex avatar saisankargochhayat avatar harshad16 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.