Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a smaller production pip install? #2007

Closed
crearo opened this issue Apr 27, 2019 · 3 comments
Closed

Create a smaller production pip install? #2007

crearo opened this issue Apr 27, 2019 · 3 comments

Comments

@crearo
Copy link

crearo commented Apr 27, 2019

I want to run an inference on heroku where I've already hosted my website.
Everything worked great on my laptop, but as soon as I push to Heroku, it complains about its maximum size limit being 500MB.

Here's all I've done:

  1. pip install fastai
  2. pip freeze > requirements.txt # fastai internally installs so many more pypis
  3. git push heroku master

Aaaand, heroku fails. Specifically, it redirects me to the slug-size page.

Can we have a separate install for inferencing only? I know PyTorch comes with a CPU only build that's 45MB and is meant for production.

@stas00
Copy link

stas00 commented Apr 28, 2019

Here are the instructions that let you choose and pick what fastai dependencies you want to install:
https://docs.fast.ai/install.html#custom-dependencies

But dependencies of dependencies is beyond of fastai control.

@crearo
Copy link
Author

crearo commented Apr 28, 2019

Thanks! It's still going over the roof even with the CPU build, and I'm kinda clueless at this point.
If I come across something I'll put it up here.

The suggestions on the fastai forums didn't help either. https://forums.fast.ai/t/hosting-a-simple-web-application/13696/19

@crearo crearo closed this as completed Apr 28, 2019
@crearo
Copy link
Author

crearo commented Apr 28, 2019

Alright! The trick was to just type:

fastai
https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl

in requirements.txt.

I was doing a pip freeze > requirements.txt which does not work. I'm still
This still is problematic for me because every time I pip install something I have to be extra careful to put it in the requirements.txt file manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants