How To Deploy ML Models With Google Cloud Run

  Рет қаралды 45,591

Patrick Loeber

Patrick Loeber

Күн бұрын

Learn how to deploy Machine Learning / Deep Learning models with Google Cloud Run. We build a simple app with TensorFlow and Flask, containerize it with Docker, and deploy it to Google Cloud Run.
Code and instructions: github.com/patrickloeber/ml-d...
Get my Free NumPy Handbook:
www.python-engineer.com/numpy...
✅ Write cleaner code with Sourcery, instant refactoring suggestions in VS Code & PyCharm: sourcery.ai/?... *
⭐ Join Our Discord : / discord
📓 ML Notebooks available on Patreon:
/ patrickloeber
If you enjoyed this video, please subscribe to the channel:
▶️ : / @patloeber
~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~
🖥️ Website: www.python-engineer.com
🐦 Twitter - / patloeber
✉️ Newsletter - www.python-engineer.com/newsl...
📸 Instagram - / patloeber
🦾 Discord: / discord
▶️ Subscribe: / @patloeber
~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~
🅿 Patreon - / patrickloeber
#Python
Resources:
cloud.google.com/sdk/docs/ins...
cloud.google.com/run/docs/qui...
sararobinson.dev/2020/08/18/m...
TensorFlow course: • TensorFlow 2 Beginner ...
PyTorch course: • PyTorch Tutorials - Co...
Timeline:
00:00 Introduction
00:52 Prepare Model
04:27 Write Flask App
12:20 Setup Google Cloud Project
12:59 Google Cloud SDK
13:47 Dockerfile
16:41 Deploy
----------------------------------------------------------------------------------------------------------
* This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

Пікірлер: 82
@patloeber
@patloeber 3 жыл бұрын
What other deployment methods would you like to see?
@sakilahmed6788
@sakilahmed6788 3 жыл бұрын
Is Google cloud service free to train model?
@anelm.5127
@anelm.5127 3 жыл бұрын
AWS would be amazing
@rohanmehra3894
@rohanmehra3894 3 жыл бұрын
Aws, Azure, docker, etc
@patloeber
@patloeber 3 жыл бұрын
@@anelm.5127 thanks, yes will definitely do AWS
@patloeber
@patloeber 3 жыл бұрын
@@sakilahmed6788 There is a free tier which is enough to play around with it
@nadillasyihaq5205
@nadillasyihaq5205 2 жыл бұрын
Thank you very much sir. Your tutorial really helped me. I'm so glad I finally found a tutorial that worked for me 😁
@neo-the-one
@neo-the-one 3 жыл бұрын
Great job as always man 👏 much appreciated, alot of people show how to create a ml app but not how to deploy it
@patloeber
@patloeber 3 жыл бұрын
glad you like it!
@rishiladdha
@rishiladdha 7 ай бұрын
This was extremely helpful. Thank you so much!
@sambhawsharma8239
@sambhawsharma8239 3 жыл бұрын
Thank you for your great videos, I have been using python for past 3 years but still didn't know many things, or using those things with knowing. I hope other would take advantage of these excellent tutorials, I will surely encourage my friends to watch and subscribe.
@patloeber
@patloeber 3 жыл бұрын
thanks! I also still don't know many things ;) you should never stop learning...
@yevg3907
@yevg3907 3 жыл бұрын
Wow man I am glad I subscribed I was there when you just started and so much proper content since then it’s amazing! Thank you so much for all this!!!!! Great stuff !!!!
@patloeber
@patloeber 3 жыл бұрын
Happy to hear that :) Thanks so much for your support!
@yevguyduy329
@yevguyduy329 3 жыл бұрын
@@patloeber Would it be possible to do one with app engine?
@maduresenerd5716
@maduresenerd5716 Жыл бұрын
thanks bro, you helped me a lot
@husk1188
@husk1188 Жыл бұрын
great demo!
@rafaellauxen3577
@rafaellauxen3577 3 жыл бұрын
Nice tutorial, thank you!
@patloeber
@patloeber 3 жыл бұрын
Glad it was helpful!
@brentsimpson3791
@brentsimpson3791 3 ай бұрын
Awesome thank you.
@user-or7ji5hv8y
@user-or7ji5hv8y 3 жыл бұрын
another great topic!
@patloeber
@patloeber 3 жыл бұрын
thanks!
@Alecor_studio
@Alecor_studio 3 жыл бұрын
Can`t wait for this! Also will you do kubernetes in future some time too ?
@patloeber
@patloeber 3 жыл бұрын
Great suggestion! I will have to look into this...
@ajinkyabankar8036
@ajinkyabankar8036 Жыл бұрын
Thanks for a great video. In addition to the video content, can you build a simple webapp using Dash and show the demonstration? Preferably, the end user can upload the image in the webapp and see the classification result. That will be cool!
@petricaradan3752
@petricaradan3752 2 жыл бұрын
Hello! Thanks for this great tutorial. I have one question. We need to install docker in our computer to deploy the model on gcp?
@elpapachelegendario8330
@elpapachelegendario8330 3 жыл бұрын
gracias por todo el conocimiento dado.
@jaggyjut
@jaggyjut 3 жыл бұрын
Just finished learning ML and was looking how to deploy. Awesome
@gilbertlopez
@gilbertlopez 3 жыл бұрын
where did you learn?
@patloeber
@patloeber 3 жыл бұрын
You're never done with learning ML ;) But congrats! Hope you'll enjoy the video
@jaggyjut
@jaggyjut 3 жыл бұрын
@@patloeber true. The basics i guess. Thanks for the tutorial. Really appreciate.
@jaggyjut
@jaggyjut 3 жыл бұрын
@@gilbertlopez udemy data science course by Jose Portilla. the good thing about this course is it covers the basic maths theory, example and then exercise.
@gilbertlopez
@gilbertlopez 3 жыл бұрын
@@jaggyjut awesome thanks for the recommendation!
@fluttydev3157
@fluttydev3157 2 жыл бұрын
Best 👍👍👍 one
@tamirtsogbayar3912
@tamirtsogbayar3912 3 жыл бұрын
Awesome
@bcg3507
@bcg3507 2 ай бұрын
Your video Literally saved my ass ...Dankeschon
@huijokim3342
@huijokim3342 10 ай бұрын
Any way to use GPU for the heavy computation model?
@placidnick100
@placidnick100 Жыл бұрын
It works for the first time but throws error on 2nd deploy: Revision 'getprediction-00002-ved' is not ready and cannot serve traffic. The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable.
@anogboy3297
@anogboy3297 3 жыл бұрын
Great
@patloeber
@patloeber 3 жыл бұрын
thanks :)
@sakaar-lok9109
@sakaar-lok9109 Жыл бұрын
love you! can we deploy tf2 models without docker and just using app engine
@user-pc7kr6vt6o
@user-pc7kr6vt6o 3 жыл бұрын
Could you tell me font or thema using in your pycharm? look so good!
@patloeber
@patloeber 3 жыл бұрын
It's the Dracula Theme
@user-go3gp7lp6o
@user-go3gp7lp6o 11 ай бұрын
here you only had one "method" - index, what if i have multiple? do i have to do gcloud build multiple times?
@shadwar123
@shadwar123 4 ай бұрын
@patloeber Hi , I am getting CORS error after deploying a Sequential model using Keras, ML model when i am using it in my react app . Can you please help me. In Model I have different layers like embeding layer, Lstm layer etc.
@ug1880
@ug1880 10 ай бұрын
I want to deploy a small application for Machine Learning. It is using BigQuery. Volume of data is medium high. I want a CICD pipeline. The application is only for business users. What service should I use for deployment on google cloud ?
@lexx-dat
@lexx-dat 4 ай бұрын
How can I do if I want an esp32-cam to send the video live to the model deployed in Google Cloud?
@quangninh8904
@quangninh8904 Жыл бұрын
how i can fix this error The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information.
3 жыл бұрын
Perfect example man, but is possible use GPU with GCP cloud run ?
@patloeber
@patloeber 3 жыл бұрын
yes it's possible, but not for free of course
@ml-engineer
@ml-engineer 2 жыл бұрын
@@patloeber There is no direct support for GPUs with Cloud run. You can do it with Cloud Run for Anthos, but for that, you again need a Kubernetes Cluster somewhere.
@peterjohngerero150
@peterjohngerero150 Жыл бұрын
I run a FastAPI ML for an android app. I did your process but it runs into an error said "Internal Server Error", what's the problem with this?
@martinalarconcarbajal417
@martinalarconcarbajal417 Жыл бұрын
Is it posible to use fastapi on google cloud run?
@ShahJr
@ShahJr 3 жыл бұрын
Exciting stuff but this requires billing to be enabled right?
@patloeber
@patloeber 3 жыл бұрын
Yes I think you need to enable it, but there is a free tier to play around with it
@-YogiDwiAndrian
@-YogiDwiAndrian 3 жыл бұрын
How code request from android studio to get prediction?
@ArunKumar-sg6jf
@ArunKumar-sg6jf 3 жыл бұрын
we have to enable billing for this yes or no Bro
@patloeber
@patloeber 3 жыл бұрын
Yes I think you need to enable it, but there is a free tier to play around with it
@leamon9024
@leamon9024 2 ай бұрын
Does Cloud Run support GPU now?
@antoniodejesuscamposrodrig5250
@antoniodejesuscamposrodrig5250 2 жыл бұрын
What Tensorflow version are you using?
@patloeber
@patloeber 2 жыл бұрын
2.x in this video...
@antoniodejesuscamposrodrig5250
@antoniodejesuscamposrodrig5250 2 жыл бұрын
@@patloeber Cool =)
@mr.gadgethd4203
@mr.gadgethd4203 2 жыл бұрын
Special thank for making tutorial on Deploy ML Models With Google Cloud Run. However, could you/everyone assist me on the next step that I want to implement "test.py" in HTML. I mean that I want to run resquests.post with my serviceURL from GCP in another index.html. Hope to receive help from everyone. Thank you so much in advance.
@user-or7ji5hv8y
@user-or7ji5hv8y 3 жыл бұрын
Did anybody else get this error? ERROR: (gcloud.run.deploy) Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
@placidnick100
@placidnick100 Жыл бұрын
yes, first run it worked but 2nd deploy I saw the error, any clue how to fix it?
@loosoonchin6469
@loosoonchin6469 3 жыл бұрын
import requests resp = requests.post("127.0.0.1:5000/", files={'file': open('three.png', 'rb')}) print(resp.json()) Output: Traceback (most recent call last): File "d:\Self Learning- Tutorial\Python-PE Advance PYthon\GoogleCloudML_Deployment\test\test.py", line 3, in resp = requests.post("127.0.0.1:5000/", files={'file': open('three.png', 'rb')}) FileNotFoundError: [Errno 2] No such file or directory: 'three.png' I did have three.png, why is it not running the prediction function here? I stopped main.py and run test.py. Do I have to run the main.py at the same time? btw I am using VS code.
@vigneshvlk4928
@vigneshvlk4928 3 жыл бұрын
In pycharm
@user-go3gp7lp6o
@user-go3gp7lp6o 11 ай бұрын
Anyone face this issue? Gcloud is not recognised as an internal or external command
@vigneshvlk4928
@vigneshvlk4928 3 жыл бұрын
You will useing Linux
@FanaticAuthorship
@FanaticAuthorship Жыл бұрын
total fraud, your thumbnail said app deployement.
Deploy ML model in 10 minutes. Explained
12:41
Danil Zherebtsov
Рет қаралды 11 М.
Google Cloud Platform (GCP) - Cloud Run
1:53:07
Cloud Monkey
Рет қаралды 27 М.
Final muy increíble 😱
00:46
Juan De Dios Pantoja 2
Рет қаралды 54 МЛН
Каха и суп
00:39
К-Media
Рет қаралды 4,2 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 96 МЛН
Machine learning on Google Cloud
7:08
Google Cloud Tech
Рет қаралды 61 М.
Best Platforms to Host Python Apps (for free!!)
9:50
Patrick Loeber
Рет қаралды 110 М.
10 ways to use machine learning with Google Cloud, in 15 minutes
12:46
Google Cloud Tech
Рет қаралды 15 М.
Deploying ML Models in Production: An Overview
14:27
Valerio Velardo - The Sound of AI
Рет қаралды 40 М.
Cloud Run QuickStart - Docker to Serverless
7:50
Fireship
Рет қаралды 180 М.
Deploy your Flask app on Google Cloud Platform
17:51
Leslie Wubbel
Рет қаралды 12 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 54 М.
Build an AI app with FastAPI and Docker - Coding Tutorial with Tips
35:18
Final muy increíble 😱
00:46
Juan De Dios Pantoja 2
Рет қаралды 54 МЛН