Trying to Serve a ML (pytorch) model on a Heroku, slug size too large

Viewed 313

I have a trained pytorch ML model that I would like to publish as a Heroku / Flask app. The model is about 200 MB large, which puts me over the slug size limit on heroku. I've tried to save the model in an S3 bucket (using heroku's Bucketeer) so that heroku can just download the model with boto3 once upon initialization, but then I get timeout errors. Is there any good way to serve a relatively large model with heroku? If not, where should I migrate to?

I should say that I've also tried migrating everything to the Google App Engine Standard, but that didn't work since several needed libraries are not supported currently. I am also unable to migrate to AWS directly since my AWS account was hacked a while ago and they basically banned me from using their services again. (Their customer support was too incompetent to deal with the issue, though they are aware of the hack.). I'm really at my wits end at this point and I don't want to waste another few days trying to get a new environment to work without some reasonable expectation that it will work....

Any help is appreciated, thanks!

0 Answers
Related