CoolFace
Apppublic

MrYeti/q-tips-api

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
ReadMe.txt56 linesDownload Raw Back to root
1Docker base image and installation details: https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker2 3 41. Build create image and run docker locally:5 6docker build -t q-tips .7docker run --name q-tips -p 80:80 q-tips8 92. Postman Instructions:10 11http://127.0.0.1/getquestion12 13{14 15"context" : "Donald Trump is an American media personality and businessman who served as the 45th president of the United States.",16"answer" : "American"17 18}19 20 213. Google cloud Run: Push docker to Google container registry22 23Create a project on gcloud console.24Install Gcloud SDK from https://cloud.google.com/sdk/docs/quickstart25gcloud init26 27docker build . --tag gcr.io/question-generation-312318/question-generation:latest28 29 30https://cloud.google.com/container-registry/docs/advanced-authentication31gcloud auth configure-docker32 33docker push gcr.io/question-generation-312318/question-generation:latest34 354. Deploy API using Google Cloud Run36 37gcloud init  ---> Choose re-initialize this configuration [default] with new settings --> Pick correct cloud project to use.38 39 40Parameters: https://cloud.google.com/sdk/gcloud/reference/run/deploy41 42gcloud run deploy --image gcr.io/question-generation-312318/question-generation:latest --cpu 2 --concurrency 1 --memory 4Gi --platform managed --min-instances 0 --timeout 1m --port 8043 44 455. Postman Instructions:46 47https://question-generation-sma6nn7ufq-el.a.run.app48 49{50 51"context" : "Donald Trump is an American media personality and businessman who served as the 45th president of the United States.",52"answer" : "American"53 54}55 56