bzamecnik / deep-instrument-heroku

ML model to classify music instruments from audio - Heroku deployment.
MIT License
18 stars 9 forks source link

Slug size is too large #3

Open moelgendy opened 7 years ago

moelgendy commented 7 years ago

Hi,

Great app. I tried deploying this app (for my learning purposes) and it gave me slug size error (630 MB). It looks like all dependencies are important. How did you deploy this app to heroku?

Thanks!

bzamecnik commented 7 years ago

Hm. That's strange. My slug was 176.4M, which itself is also a bit big.

moelgendy commented 7 years ago

That's weird. The only thing I changed is adding "tensorflow" in the requirements.txt instead of: https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp34-cp34m-linux_x86_64.whl

because heroku gives me an error that this wheel is not supported. Which worked for me for other apps.

Here is my repo: https://github.com/moelgendy/deep-instrument-heroku

bzamecnik commented 7 years ago

Aah, in requirements.txt there was not fixed-version output of pip freeeze. Thus a newer version of TensorFlow/Keras/etc. slipped in. :(

bzamecnik commented 7 years ago

No I mean I forgot to run pip freeze > requirements.txt to fix versions of packages present in my environment.

TensorFlow was 0.10 and Keras something from that time, something 1.x.

moelgendy commented 7 years ago

So what do you suggest I do to be able to deploy this app?

bzamecnik commented 7 years ago

That's all I can advice you at the moment. Good luck.

teddyphotos commented 4 years ago

I fixed it by changing the Tensorflow package version from 2.1.0 to 1.7.0 in requirements.txt Give it a try but be careful it may lead to broken code !! Cheers

narendernani5 commented 4 years ago

Only few versions of TensorFlow have less size. for me Tensorflow versions 1.5.0, 1.7.0, 2.0.0 worked.

amolpreets commented 4 years ago

try changing tensorflow version to 2.0.1 .. that worked for me !

Mayureshdindorkar commented 3 years ago

Use tensorflow-cpu==2.1.0. Worked for me on heroku as we do not require GPU on Heroku.

Mayureshdindorkar commented 3 years ago

pip install tensorflow-cpu==2.1.0