branliu0 / heroku-buildpack-scipy

Custom Heroku buildpack for Python with NumPy and SciPy
MIT License
97 stars 68 forks source link

netcdf/hdf5 support? #17

Closed kcaylor closed 9 years ago

kcaylor commented 9 years ago

I'm trying to get a numpy/scipy project running on heroku, but the project requires the use of netcdf and hdf5. I'm new to buildpacks generally, but this one seems like a great place to start. Any suggestions as to how to proceed? I have compiled netcdf and hdf5 binaries on heroku, but integrating them into the buildpack and getting pip to 'do the right thing' has proven difficult.

branliu0 commented 9 years ago

The buildpack script is similar to any kind of server provisioning script, if you've done that before.

  1. Make a new script in bin/steps/ for installing netcdf/hdf5
  2. Add a line in bin/compile so that your new script gets called (probably anywhere before bin/steps/pip-install is fine)
  3. In your script, download the binaries, and install them as needed (probably put them in some folder and set environment variables so that they can be found)

Does that answer your question? I've never used netcdf/hdf5 so I don't quite know what installation dependencies there are.

kcaylor commented 9 years ago

I got most of that working, but am having trouble getting the hdf5 library files to be seen. I think this has to do with how I was setting up the paths. I'll keep poking around and if I get something sorted out will update here.

branliu0 commented 9 years ago

Yeah, that sounds like something that is specific to hdf5 installation, so I can't really help much there...

You probably already know this, but there is a set-env function (defined in bin/utils) that should help with setting environment variables.