GithubHelp home page GithubHelp logo

hey-orpheus's Introduction

Heroku buildpack: Python, Numpy, Scipy, Scikit-learn

This is a Heroku buildpack for Python apps, powered by pip.

Additionally, it adds support for Numpy, Scipy and Scikit-learn.

Build Status

This fork adds an additional build step to download the NLTK corpora brown, punkt, wordnet for TextBlob

Differences to other forks

This buildpack is strongly inspired by @wyn and @ToonTimbermont. In fact, I copied a lot of code from them. It also uses binaries provided by @wyn. Thanks a lot.

In contrast to their forks, this buildpack does not require a setup.py, it works with a normal requirements.txt file. Additionally, it is based on the current version of the heroku-buildpack-python. This means that it uses a current version of pip, which gets rid of some stack traces in the deploy log.

Setup, Usage

First of all, it is important that your requirements for Numpy and SciPy use only one of the versions available as precompiled binaries here: https://github.com/dbrgn/npscipy-binaries At the time of this writing, supported versions are:

  • Numpy 1.6.1
  • Numpy 1.7.0
  • Scipy 0.10.1
  • Scipy 0.11.0

Then specify the buildpack as usual. For a new app:

heroku create --buildpack https://github.com/dbrgn/heroku-buildpack-python-sklearn/

For an existing app:

heroku config:set BUILDPACK_URL=https://github.com/dbrgn/heroku-buildpack-python-sklearn/

Demo

$ mkdir testheroku
$ cd testheroku
$ git init
$ heroku create --buildpack https://github.com/dbrgn/heroku-buildpack-python-sklearn/
$ echo -e "numpy==1.7.0\nscipy==0.11.0\nscikit-learn==0.13.1" > requirements.txt
$ git add requirements.txt
$ git commit -m 'Added requirements'
$ git push heroku master
Counting objects: 3, done.
Writing objects: 100% (3/3), 260 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> Python app detected
-----> No runtime.txt provided; assuming python-2.7.4.
-----> Preparing Python runtime (python-2.7.4)
-----> Installing Distribute (0.6.36)
-----> Installing Pip (1.3.1)
-----> Noticed numpy/scipy. Bootstrapping prebuilt binaries.
-----> Creating/downloading binaries.
-----> Creating/downloading numpy bdist.
-----> Creating/downloading scipy bdist.
-----> Moving everything from venv directory to python directory...
-----> Installing dependencies using Pip (1.3.1)
-----> Noticed scikit-learn. Installing...
-----> Setting environment vars...
-----> Installing scikit-learn==0.13.1 via pip
Downloading/unpacking scikit-learn==0.13.1
  Running setup.py egg_info for package scikit-learn

(...)

Successfully installed scikit-learn
Cleaning up...
       Cleaning up...

-----> Discovering process types
       Procfile declares types -> (none)

-----> Compiled slug size: 59.6MB
-----> Launching... done, v4
       http://ancient-eyrie-7305.herokuapp.com deployed to Heroku

To [email protected]:ancient-eyrie-7305.git
 * [new branch]      master -> master

hey-orpheus's People

Contributors

appono avatar

Watchers

 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.