Deployment Platform: Render ✅

Hi everyone,

I’m the founder of Render, a new cloud provider that makes it trivial to deploy webapps in production. Some of you might know me from Crestle which I built back in 2017 (it is now owned and operated by doc.ai).

I’ve created a guide for deploying fast.ai models on Render: https://course-v3.fast.ai/deployment_render.html

Render is still invite only, but I’d love for fast.ai users to be able to deploy their models on it just as easily as they train their models on Crestle. The guide has the invite code exclusive to fast.ai students. Please let me know if I can help with anything!

41 Likes

I was not able to create an account. There was no error message provided, but the “SIgn Up” button did not result in any action. Looking forward to using Render!

1 Like

There was an issue with the invite code. Should be good to go now.

2 Likes

I’m looking forward to hearing how folks go with Render - I haven’t tried it myself, but it looks pretty cool, and @anurag has a track record of building stuff that works well. :slight_smile:

3 Likes

Ok, I can provide quick feedback about Render, I just signed up yesterday night, and so far “Fantastic” :100:

I was able to deploy https://github.com/pankymathur/fastai-vision-app and https://github.com/pankymathur/keras-vision-app as a live app from a simple git push from my local dev environment. No size limit issue at all like Zeit.

Plus @anurag personally helped in fixing and providing help by suggesting best practice around Docker file to reduce the size and build times dependencies.

Overall I like the “Render” user-friendly interface, especially frictionless integration with GitHub, this is definitely something which is an edge over AWS Beanstalk, Azure Website for Containers and Google App Engine, I still need to perform some speed test and compare pricing but overall Render look like have a bright future ahead.

:+1: to Render Team.

9 Likes

Hi Pankaj,

I am using your guide to deploy my model on Render, and I came to this error:

OSError: [Errno 30] Read-only file system: ‘app/static/grad_cam.png’

(for the context, I want to add another image to the result page, beside the original image users upload)
I haven’t updated to your new version yet because I did make a bunch of changes to it already, and I am able to deploy it to amazon beanstalk.

Try using

tmp

instead of

path

for storing and showing user uploads

for example:

IMG_FILE_SRC = ‘/tmp’/‘static’/‘saved_image.png’

instead

IMG_FILE_SRC = path/‘static’/‘saved_image.png’

This allows the app to run without updating the root filesystem in Docker because Render is read only root file system currently.

2 Likes

Hi Quan,

I just went through your classifier. I believe you’re generating additional images. As @pankymathur pointed out, all you need to do is save them under /tmp instead of under /app/static and load them from there.

I think Python will complain with that syntax. You probably need /tmp/static/saved_image.png.

Hi Anurag,

Thanks for the help. So I changed my gradcam file src to GRADCAM_FILE_SRC = ‘tmp/static/gradcam_image.png’, and also create tmp/static directory with a temp img file there (you can view it in my repo here https://github.com/anhquan0412/animation-classification-deployment), and the error is now

FileNotFoundError: [Errno 2] No such file or directory: 'tmp/static/gradcam_image.png'

Do I follow your instruction correctly?

If I understand correctly, you’re generating the heatmap and isolating regions images dynamically? Let me submit a PR so this works as expected. /tmp shouldn’t be in your repo; it’s overridden by Render because we start you off with an empty /tmp.

I’ll submit a PR for your repo in a few.

1 Like

Thanks so much! And yes, I wrote a small class to generate heatmap img and save it using matplotib

fig.savefig(GRADCAM_FILE_SRC)

Here you go! https://github.com/anhquan0412/animation-classification-deployment/pull/1

1 Like

The site works now! Thanks so much for the help and the suggestion on the concurrent problem. I will investigate it more at another time though as I just want it to work first and I am not truly familiar with Pankaj demo app yet.

It looks like torch nightly builds are broken

-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html

in requirements.txt doesn’t work any more. I’ll update the sample repo once I have a fix.

FYI: this is working again. Looks like pytorch had a temporary deploy issue.

Hey @anurag I am using fastai 1.0.40.dev0 version.
Does render support it?

I am trying to build a app for regression and modified the following from sample code.

    async def setup_learner():
        await download_file(model_file_url, path/'models'/f'{model_file_name}**.pkl'**)
        learn = load_learner(model_file_name)
        return learn

and

async def analyze(request):
    data = await request.form()
    img_bytes = await (data['file'].read())
    img = open_image(BytesIO(img_bytes))
    **prediction = learn.predict(img)[1] * n_const**
    return JSONResponse({'result': str(prediction)})

Does this make any sense?

Render supports any and all versions because this is a Docker-based deployment. But you’ll need to update the default requirements.txt to use the version you want. You can change it here: https://github.com/shreyasgite/fastai-v3/blob/master/requirements.txt

1 Like

@anurag

I’ve been trying to deploy a model to Render. I get as far as “pushing image to registry”, but then it says the deployment fails without any error message. Do you know what might be the problem?

1 Like

Looking at the logs, your service is being OOMKilled. Likely because it ends up taking more than 1GB of memory. How big is your model file?

1 Like