https://github.com/mrgeislinger/mlops-example-spam-detector
An example MLOps process from model creation to deployment on Google Cloud via Cloud Run
https://github.com/mrgeislinger/mlops-example-spam-detector
deployment docker google-cloud machine-learning mlops
Last synced: 11 months ago
JSON representation
An example MLOps process from model creation to deployment on Google Cloud via Cloud Run
- Host: GitHub
- URL: https://github.com/mrgeislinger/mlops-example-spam-detector
- Owner: MrGeislinger
- Created: 2022-03-22T22:33:26.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-13T02:30:30.000Z (almost 4 years ago)
- Last Synced: 2025-04-01T03:51:20.112Z (12 months ago)
- Topics: deployment, docker, google-cloud, machine-learning, mlops
- Language: Jupyter Notebook
- Homepage:
- Size: 2.11 MB
- Stars: 2
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker
> Setup using Docker
## Local
* Build image: `docker build . -t spam-detector-image`
* Container: `docker run -p 8080:8080 --name spam-detector-container spam-detector-image`
* Go to URL (like `http://0.0.0.0:8080/`)
## GCP
> Make sure you have a GCP project setup already.
>
> Also may need to authenticate before pushing Docker image: https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud-helper
### Cloud Run
* (Move files)
* (not needed?) `docker build . -t spam-detector-image`
* `docker tag spam-detector-image gcr.io/{PROJECT_ID}/spam-detector:vX`
* (Best if Docker image pushed to Google Cloud Registry - GCR)
- (Allow for connection of Docker to GCR)
- `docker push gcr.io/{PROJECT_ID}/spam-detector:vX` (note `gcr.io` is based on region)
- https://support.terra.bio/hc/en-us/articles/360035638032-Publish-a-Docker-container-image-to-Google-Container-Registry-GCR-
- https://cloud.google.com/container-registry/docs/advanced-authentication#console_2
* Create service in Cloud Run
* Use Docker image created for run