https://github.com/dudeperf3ct/6-ml-fastapi-aws-serverless
https://github.com/dudeperf3ct/6-ml-fastapi-aws-serverless
aws codepipeline docker elasticbeanstalk fastapi mlops model-serving
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dudeperf3ct/6-ml-fastapi-aws-serverless
- Owner: dudeperf3ct
- Created: 2021-12-09T17:24:50.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T18:28:27.000Z (about 4 years ago)
- Last Synced: 2025-05-24T11:38:42.411Z (9 months ago)
- Topics: aws, codepipeline, docker, elasticbeanstalk, fastapi, mlops, model-serving
- Language: Jupyter Notebook
- Homepage:
- Size: 1.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
### Deploy ML model to AWS using FastAPI
AWS app: http://wine-ratings.us-east-1.elasticbeanstalk.com/
In this exercise, we will build a fastapi ML application and deploy it with continuous delivery on AWS using AWS using Elastic Beanstalk and Code Pipeline.
### ML
To build a ML model, refer the colab notebook under `notebooks` folder.
### FastAPI
To validate the fastapi application locally,
```bash
docker build -t wine .
docker run --rm -it -v $(pwd):/app -p 8000:8000 wine
```
### AWS
To deploy the fastapi application on AWS following steps were taken.
1. Create AWS account.
2. Under `Elastic Beanstalk`, create a environment. Select `Docker` under `Platform` section.
3. Zip the contents of repo using command below and upload the file to `Application code` section. Creating environment takes fair amount of time.
```bash
cd 6-fastapi-ml-aws-serverless
zip -r -D code.zip .
```
4. In next step, we will use `Code Pipeline` for continuous delivery using Github event trigger. Create a pipeline that connects the source code to Elastic beanstalk application.