fbpx

3 Steps to Build & Deploy Data Science API using FastAPI, Docker, Pipenv, AWS

This general overview will teach you how to build a data science app using FastAPI framework, Use Docker or Pipenv for your environment, then Deploy to AWS Elastic BeanStalk using Docker.

Because the information here is soo vast, I decided it would be best to create different blog posts to cover different areas of things you need to accomplish this task. So, this post is about bringing the individual blog posts together and showing you an orderly fashion to follow to build and deploy your API.

Step 1: Choose your environment

You can use docker for your environment or you can use pipenv for your environment.

Using Docker for your environment.

Using Pipenv for your environment.

Alternative to docker, you can also use Pip virtual environment for your machine learning project. In this blog post, I detail how to use Pipenv for your project. You can also watch the youtube video here if you prefer.

After you have your environment set up, the next step is to start working on your APP.

Step 2: Build your Data Science API.

If it’s your first time installing docker, then you would want to know how to use docker for data science projects. In this blog post, I show you exactly step-by-step guide on using docker for data science projects.

The next step is to download FastAPI and start working on your machine learning project. Once again, I have created a detailed blog on how to build a data science API using FastAPI. Go here to check out that blog, follow it word-for-word, then come back here to learn how to deploy your API.

Step 3: Deploy your APP TO AWS using ElasticBeanStalk.

After you have built your app, you may want to put it online using AWS. In this blog post, I detail how to deploy machine learning API APP to Amazon Web Services Elastic Beanstalk with docker as your environment.

If you follow the 3 step process I outlined above, you should have your API APP up and running online in no time.

I hope you enjoyed this tutorial content.

Leave a Comment

Scroll to Top