Skip to content

Starter app for fastai v3 model deployment on Render

Notifications You must be signed in to change notification settings

foobar167/web_api_for_render

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy fast.ai models on Render

Starter project to deploy a trained fast.ai models to the web using Render.

Web app

Guide for production deployment to Render is here.

This is the original project.

Prepare your starter app:

  • Fork this repository.
  • Sign up for a Render account.

Deploy it:

  1. Create a new Web Service on Render Dashboard and use the repo you created above. You will need to grant Render permission to access your repo in this step.
  2. On the deployment screen, pick a name for your service and use Docker for the Environment. The URL will be created using this service name. The service name can be changed if necessary, but the URL initially created can’t be edited.
  3. Click Save Web Service. That’s it! Your service will begin building and should be live in a few minutes at the URL displayed in your Render dashboard. You can follow its progress in the deploy logs.

Modify you repository:

  • Share link on bears_trained_model.pkl or other Pickle file in your Google Drive. Anyone with the link or anyone in the Internet can view it.
  • Create the downloadable (not shareable) direct link. Use direct link generator for Google Drive, Dropbox or Onedrive.
  • Edit the file server.py inside the app directory and update the model_file_url variable with the URL copied above. Update export_file_name to bears_trained_model.pkl. Update classes if you have other classes.
  • Push a change into GitHub. Render integrates with your GitHub repo and automatically builds and deploys changes every time you push a change.
  • Wait several minutes (now it is 6 min) for the application to deploy.
  • Test out this web-site with bear images!

You can test your changes locally by installing Docker and using the following command:

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

Please use Render's fast.ai forum thread for questions and support.

About

Starter app for fastai v3 model deployment on Render

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 39.6%
  • HTML 21.3%
  • JavaScript 19.0%
  • CSS 14.7%
  • Dockerfile 5.4%