Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I managed to get this working on the cedar stack by building numpy and scipy offline as bdists and then modifying the heroku python buildpack to unzip these onto the dyno's vendor/venv areas directly. You can also use the buildpack to set environment variables that persist.</p> <p>Heroku haven't officially published buildpacks yet - search for 'heroku buildpacks' for more thirdparty/heroku ones and information.</p> <p>My fork of the python build pack is here: <a href="https://wyn@github.com/wyn/heroku-buildpack-python.git">https://wyn@github.com/wyn/heroku-buildpack-python.git</a></p> <p>The changes are in the bin/compile where I source two new steps, a scipy/numpy step and an openopt step. The scripts for the two steps are in bin/steps/npscipy and bin/steps/openopt. I also added some variables to bin/release. Note that I am assuming installation through a setup.py file rather than the requirements.txt approach (c.f. <a href="https://devcenter.heroku.com/articles/python-pip#traditional_distributions">https://devcenter.heroku.com/articles/python-pip#traditional_distributions</a>).</p> <p>I also download the blas/lapack/atlas/gfortran binaries that were used to build numpy/scipy onto the dyno as there are c extensions that need to link through to them. The reason for building everything offline and downloading is that pip-installing numpy/scipy requires you to have a fortran compiler + associated dev environment and this made my slugs too big.</p> <p>It seems to work, the slug size is now 35mb and scaling seems fast too. All but one of the numpy tests pass and all of the scipy tests pass.</p> <p>This is still work in progress for me but I thought I'd share.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload