/ml-mask-detection-0421

Primary LanguageJupyter NotebookMIT LicenseMIT

Detecção de Máscaras com Machine Learning

==============================

Roadmap para Deploy na GCP

  1. Build da Docker Image
# Faz o build as imagens do app e frontend
$ sudo docker-compose -f api/docker-compose.yml build
  1. Autenticar na GCP
# Login na GCP Account
$ gcloud auth login --no-launch-browser
# Configura projeto principal
$ gcloud config set project <PROJECT_ID>
# Permite o acesso ao Google Container Registry
$ gcloud auth configure-docker
  1. Cria a tag do container no GCR
# Configura a tag dentro do container registry
$ sudo docker tag api_app gcr.io/<PROJECT_ID>/fastapi
# Faz o push da imagem no GCR
$ sudo docker push gcr.io/<PROJECT_ID>/fastapi
  1. Deploy dentro do Cloud Run
$ gcloud run deploy fastapi \
  --image gcr.io/awari-mask-cloudrun/fastapi \
  --platform managed \
  --allow-unauthenticated \
  --memory '2G'