Deployment Platform: Render ✅

So if I trained my model in kaggle, the requirements must be from kaggle, right?

So I got an error like this and I used the requirements from kaggle:
src = LabelLists.load_state(path, state.pop(‘data’))
KeyError: ‘data’
May 26 12:25:09 PM error building image: error building stage: waiting for process to exit: exit status 1
May 26 12:25:09 PM error: exit status 1

Somebody knows how to solve it?

Oh. How did I not see that. Thanks a ton man. Worked Just fine.

I’ve updated requirements.txt in the sample repo to pin all versions. As long as you have the same versions of fastai, torch, and torchvision installed in your Jupyter notebook where you train the model, everything should work as expected.

I’ve also updated the repo README with a command you can run to test your changes locally before deploying on Render:

docker build -t fastai-v3 . && docker run --rm -it -p 5000:5000 fastai-v3
1 Like

Hi,I have something wrong in the web. After uploading the image it is stuck at analyzing,I have update the requirements.and I use the bears model you created.It also can’t work normally. How to solve it ?

Hi everyone thank you for the amazing thread! Learning so much from this. @anurag thank you for the wonderful service and support as well!

Wanted to ask if anyone out there has deployed a generative app in render. Nothing fancy to start with just loading an image but getting an image, rather than a class, as output.

Thanks in advance!

Kind regards,

Hi @anurag,

Fantastic platform!! Super easy!! I have no first hand experience in any of this, Render platform made it a breeze for me. Thank you very much for the demo repo and replying to all the queries posted here.

As I just started with fastai lesson-1, I went full-cycle following @jeremy’s philosophy of ‘Try it out, get your hands dirty!’. First time every setting and using a Cloud platform (Google in my case), training a CNN deep-learning model and deploying it. I am psyched now :slight_smile:

Git Repo on dogs and cats breed Render App.

Render App

Sample Tester, it did classify the dog!!

Moving on to lesson-2…

1 Like

Amazing! Congratulations on your first live model. This is what makes so great: real applications from day 1.

Hi @anurag ,
sorry if it was here and I did not find it…
Is there an example of a deployment on Render of the IMDB lesson? (specifically I would like to deploy a text generator)

Congratulations on achieving your first milestone! Plenty of more interesting things to come.
On a side note, avoid @ tagging Jeremy unless there is something super urgent.


Hi there,

just a quick question: there is no free option anymore, right? I have to pick the 5$/mo pricing plan for deploying my toy service. Is that correct?

That is correct. Every service deployed on Render is a cost to us, and to build a long term sustainable service we do need to charge for compute resources.


I absolutely understand that. I was just surprised, because Jeremy mentioned in the video that it was free. I guess you guys have updated your pricing as the service matured. That’s totally fine. I just wanted to double-check, in case I missed some kind of voucher link or something. :sweat_smile:

Ah. Jeremy was probably referring to credits that we gave out prior to public launch. Our beta testers deserved it!


Hello everyone, I am trying to deploy my first classifier on Render.

I decided to install the bear classifier example in the production section of the course first, to reduce any issues I may have when installing my app.
Unfortunately when I press the deploy button on the Render Services page I receive the following error.

Jun 8 06:33:31 AM INFO[0195] RUN python app/
Jun 8 06:33:34 AM Traceback (most recent call last):
File “app/”, line 9, in
from import *
File “/usr/local/lib/python3.7/site-packages/fastai/vision/”, line 3, in
from .learner import *
File “/usr/local/lib/python3.7/site-packages/fastai/vision/”, line 6, in
from . import models
File “/usr/local/lib/python3.7/site-packages/fastai/vision/models/”, line 2, in
from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
File “/usr/local/lib/python3.7/site-packages/torchvision/”, line 1, in
from torchvision import models
File “/usr/local/lib/python3.7/site-packages/torchvision/models/”, line 11, in
from . import detection
File “/usr/local/lib/python3.7/site-packages/torchvision/models/detection/”, line 1, in
from .faster_rcnn import *
File “/usr/local/lib/python3.7/site-packages/torchvision/models/detection/”, line 7, in
from torchvision.ops import misc as misc_nn_ops
File “/usr/local/lib/python3.7/site-packages/torchvision/ops/”, line 1, in
from .boxes import nms, box_iou
File “/usr/local/lib/python3.7/site-packages/torchvision/ops/”, line 2, in
from torchvision import _C
ImportError: cannot open shared object file: No such file or directory
Jun 8 06:33:35 AM error building image: error building stage: waiting for process to exit: exit status 1
Jun 8 06:33:35 AM error: exit status 1

Does anyone have the solution to this problem or can someone suggest the best approach to solving this issue?
Thanks in advance.smiley::smiley:

I was using render too, now i switched over to Google App Engine. There is a tutorial on the course website on it, and not a bad way to make use of the free compute credits Google is providing for free.



I am trying to deploy my model on Render, but getting the following error:
File “app/”, line 48, in
learn = loop.run_until_complete(asyncio.gather(*tasks))[0]
File “/usr/local/lib/python3.7/asyncio/”, line 584, in run_until_complete
return future.result()
File “app/”, line 35, in setup_learner
learn = load_learner(path, export_file_name)
File “/usr/local/lib/python3.7/site-packages/fastai/”, line 598, in load_learner
state = torch.load(source, map_location=‘cpu’) if defaults.device == torch.device(‘cpu’) else torch.load(source)
File “/usr/local/lib/python3.7/site-packages/torch/”, line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File “/usr/local/lib/python3.7/site-packages/torch/”, line 564, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ‘<’.

Can anybody help?

I found somewhere that the following line of code should be used for pickle error :

from functools import partial
import pickle
pickle.load = partial(pickle.load, encoding=“latin1”)
pickle.Unpickler = partial(pickle.Unpickler, encoding=“latin1”)
model = torch.load(model_file, map_location=lambda storage, loc: storage, pickle_module=pickle

However now I m getting the following error now:
Jun 11 03:41:50 PM File “app/”, line 17
Jun 11 03:41:50 PM export_file_url = ‘
Jun 11 03:41:50 PM ^
Jun 11 03:41:50 PM error building image: error building stage: waiting for process to exit: exit status 1
Jun 11 03:41:50 PM SyntaxError: invalid syntax
Jun 11 03:41:50 PM error: exit status 1

What am I doing wrong? I have followed exactly the same instructions provided?

I had the same error.
Reuploading the model weights to drive/dropbox solved it.

I uploaded my export.pkl file to Google Drive and updated all the requisite libraries to match with the render requirements.txt and was still receiving the error:

_pickle.UnpicklingError: invalid load key, '<'.

After running the docker image locally I finally found the problem was because my .pkl file was over 25Mb. Google Drive prompts large download attempts with a warning page about virus scanning (even using that confirmation link as the download url fails!). The html warning page is downloaded instead

<!DOCTYPE html><html><head><title>Google Drive - Virus scan warning</title>

hence the invalid key <!
My solution was to upload to Dropbox where I didn’t have any problems…

If you must use Google Drive, use the Drive API: