https://github.com/dudeperf3ct/5-ml-fastapi-gcp-serverless
https://github.com/dudeperf3ct/5-ml-fastapi-gcp-serverless
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dudeperf3ct/5-ml-fastapi-gcp-serverless
- Owner: dudeperf3ct
- Created: 2021-12-09T12:51:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T14:36:10.000Z (over 3 years ago)
- Last Synced: 2024-12-31T10:17:35.662Z (5 months ago)
- Language: Jupyter Notebook
- Size: 1.16 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
### Deploy ML model to GCP using FastAPI
GCP app: https://wine-ratings-b4yojuwgbq-uc.a.run.app/
In this exercise, we will build a fastapi ML application and deploy it with continuous delivery on GCP using Cloud Run and Cloud Build..
### 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
```### GCP
To deploy the fastapi application on GCP following steps were taken.
1. While creating repo, add Google Cloud Build from Marketplace.
2. Create google cloud account.
3. Create a service in `Cloud Run` adding this repo as `Continuous Deploy from source repository`
> Add 8000 under Containers in section Container, Variables & Secrets, Connections, Security
4. App will deployed, to monitor keep checking logs.