An open API service indexing awesome lists of open source software.

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

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