Code Monkey home page Code Monkey logo

conda-buildpack's Introduction

Conda Buildpack

This is a Heroku Buildpack for Conda, the Python distribution for scientific computing by Continuum Analytics.

This buildpack enables the installation of binary packages through the open source conda application. Conda is recognized as being core to Continuum's Anaconda Scientific Python distro but it's also at the heart of the lighter weight Miniconda distro which we use here to install only the binary packages we need for our apps deployed on Heroku.

To control what binary packages are installed by conda, supply a conda-requirements.txt file (which can be created by capturing the output of conda list -e for your working conda environment). Like when using the standard buildpack for python from Heroku, you can also still supply a requirements.txt file for pip to process. In this way, you can install binary packages via conda for everything you can and still use pip for anything you can't. Usage

Example usage:

$ ls
Procfile  conda-requirements.txt  numbercrunch.py

$ heroku create --buildpack https://github.com/kennethreitz/conda-buildpack.git

$ git push heroku master
...
-----> Fetching custom git buildpack... done
-----> Python/Miniconda app detected
-----> Preparing Python/Miniconda Environment (3.5.2)
       installing: python-2.7.6-2 ...
-----> Installing dependencies using Conda
      Fetching packages ...
        bitarray-0.8.1 100% |###############################| Time: 0:00:00  17.53 MB/s00  B/s
        dateutil-2.1-p 100% |###############################| Time: 0:00:00   2.29 MB/s00  B/s
        h5py-2.3.0-np1 100% |###############################| Time: 0:00:00  13.49 MB/s00  B/s
        hdf5-1.8.9-1.t 100% |###############################| Time: 0:00:00  12.20 MB/s00  B/s
        libpng-1.5.13- 100% |###############################| Time: 0:00:00   8.05 MB/s00  B/s
        llvm-3.3-0.tar 100% |###############################| Time: 0:00:03  10.65 MB/s00  B/s
        llvmpy-0.12.6- 100% |###############################| Time: 0:00:00   9.65 MB/s00  B/s
        nltk-2.0.4-np1 100% |###############################| Time: 0:00:00   6.26 MB/s00  B/s
        numba-0.13.2-n 100% |###############################| Time: 0:00:00  11.54 MB/s00  B/s
        numexpr-2.3.1- 100% |###############################| Time: 0:00:00   6.80 MB/s00  B/s
        numpy-1.8.1-py 100% |###############################| Time: 0:00:00   8.82 MB/s00  B/s
        pandas-0.14.0- 100% |###############################| Time: 0:00:00   9.90 MB/s00  B/s
        pyside-1.2.1-p 100% |###############################| Time: 0:00:00   6.00 MB/s00  B/s
        pytables-3.1.1 100% |###############################| Time: 0:00:00   9.24 MB/s00  B/s
        pytz-2014.3-py 100% |###############################| Time: 0:00:00   1.54 MB/s00  B/s
        qt-4.8.5-0.tar 100% |###############################| Time: 0:00:01  17.36 MB/s00  B/s
        reportlab-3.1. 100% |###############################| Time: 0:00:00   4.87 MB/s00  B/s
        scikit-image-0 100% |###############################| Time: 0:00:01  12.81 MB/s00  B/s
        scikit-learn-0 100% |###############################| Time: 0:00:00   8.70 MB/s00  B/s
        scipy-0.14.0-n 100% |###############################| Time: 0:00:02  15.16 MB/s00  B/s
        shiboken-1.2.1 100% |###############################| Time: 0:00:00   3.33 MB/s00  B/s
        six-1.6.1-py27 100% |###############################| Time: 0:00:00  12.54 MB/s00  B/s

You can also add it to upcoming builds of an existing application:

$ heroku config:add BUILDPACK_URL=https://github.com/kennethreitz/conda-buildpack.git

Simple test:

>>> bitarray.test()
bitarray is installed in: /app/.heroku/anaconda/lib/python2.7/site-packages/bitarray
bitarray version: 0.8.0
2.7.3 |Continuum Analytics, Inc.| (default, Feb 25 2013, 18:46:31)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
.................................................................................................................................
----------------------------------------------------------------------
Ran 129 tests in 1.375s

OK
<unittest.runner.TextTestResult run=129 errors=0 failures=0>

Fair Warning

Heroku limits the final application footprint (slug) size to 300MB. Start small. In case the slug size limit is exceeded, deleting the build cache through the heroku-repo plugin might help.

เฅ

conda-buildpack's People

Contributors

esc avatar kennethreitz avatar marco-santoni avatar paul-english avatar pnpnpn 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.