Overview
This repository provides instructions, template source code, and examples for serving and deploying machine learning models using various frameworks and applications such as Docker, Flask, FastAPI, BentoML, Streamlit, and MLflow. It also includes code on how to deploy machine learning models as an Android app and how to deploy applications to various cloud platforms (AWS, Heroku, Vercel). The repository covers topics like version control, testing, and working with Docker.
Features
- Serving Models with FastAPI: Learn how to serve machine learning models using FastAPI.
- Serving Models with Flask: Understand how to deploy machine learning models using Flask.
- Serving Models with BentoML: Discover the process of serving models using BentoML.
- Serving Models with Mlflow: Learn how to serve models using MLflow.
- Serving Models with Streamlit: Understand how to deploy models using Streamlit.
- Serving Models as Desktop/Mobile Applications: Learn how to deploy machine learning models as desktop or mobile applications.
- How to Test your models and applications with Pytest: Explore how to perform testing on machine learning models and applications using Pytest.
- Working with Docker: Understand the process of working with Docker for serving machine learning models.
- Deploying your applications to AWS and Heroku: Learn how to deploy your applications to AWS and Heroku.
- Using Github Actions and Heroku for CI/CD: Discover how to use Github Actions and Heroku for Continuous Integration and Continuous Deployment.
Installation
To set up the environment, follow these steps:
- Install pyenv by checking the official Github repository.
- Install and configure pyenv-virtualenv for managing virtual environments.
- Install git on your system.
- For Linux, run the following command:
sudo apt-get install git
- For Linux, run the following command:
- Clone the repository.
- Change the working directory to the repository.
- Run the setup script.
- Check the installed version of Python using the command
python --version
.
To install dependencies and create virtual environments with pyenv, follow these steps:
- Navigate to the specific project folder.
- Install the project dependencies using the requirements.txt file.
- For example, for FastAPI, run
pip install -r requirements.txt
.
- For example, for FastAPI, run
- Repeat the same steps for other projects in the repository.
Summary
This repository provides a comprehensive guide on serving and deploying machine learning models using various frameworks and applications. It covers topics like setting up the environment, installing dependencies, creating virtual environments with pyenv, and deploying applications to different platforms. The repository also includes information on version control, testing with Pytest, working with Docker, and utilizing CI/CD with Github Actions and Heroku. Overall, it serves as a valuable resource for anyone looking to deploy machine learning models in a variety of scenarios.