How to deploy your Streamlit Web App to Google Cloud Run using Docker

Faizi Fifita
20 Oct 202216:28

Summary

TLDRThis video tutorial guides viewers through deploying a machine learning or deep learning model using Streamlit for UI development and Google Cloud for hosting. Key steps include setting up Docker and gcloud CLI, creating a Streamlit UI, containerizing the app with Docker, and deploying it on Google Cloud Run. The presenter also covers continuous deployment for seamless updates and emphasizes the importance of testing locally before deployment.

Takeaways

  • 🚀 **Deployment Readiness**: The video is aimed at those who have a machine learning or deep learning demo ready for deployment.
  • 🌐 **UI Development**: Streamlit is recommended for UI development due to its simplicity and integration with Python, requiring no knowledge of JavaScript, HTML, or CSS.
  • 🔗 **Resource Links**: The presenter provides links to a Medium article and other resources for further reading and assistance.
  • 🛠️ **Prerequisites**: Key prerequisites include Docker, gcloud CLI, a Google Cloud billing account, and the user's own machine learning model.
  • 📝 **Documentation and Community**: Streamlit's extensive documentation and active community are highlighted as valuable resources.
  • 💻 **Local Docker Container**: The process involves creating a local Docker container, testing it, and then building the final container using Google Cloud Build.
  • 🔄 **Container Registry**: Google Cloud Container Registry is used to store and manage Docker containers, which can be deployed from Google Cloud Run.
  • 🔧 **Configuration Settings**: The video discusses configuring settings such as port specification, resource allocation, and timeout settings for the deployed app.
  • 🔄 **Continuous Deployment**: Setting up continuous deployment with Google Cloud Run allows for automatic updates to the app when changes are pushed to a GitHub repository.
  • 🔗 **Public URL**: Upon successful deployment, a public URL is provided, allowing access to the app for sharing and use.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is deploying a machine learning or deep learning demo using Google Cloud services.

  • What are some prerequisites for deploying the demo as mentioned in the video?

    -The prerequisites include having Docker installed, gcloud CLI installed, a Google Cloud billing account enabled, and your own Python machine learning or deep learning model ready for deployment.

  • What UI framework is recommended in the video for developing the interface?

    -The video recommends using Streamlit as the UI framework because it integrates directly into Python code and requires no knowledge of JavaScript, HTML, or CSS.

  • Why is Docker used in the deployment process?

    -Docker is used because it abstracts the app into a self-contained environment, making it portable and easy to move across different platforms that support Docker containers.

  • What is the purpose of Google Cloud Build mentioned in the video?

    -Google Cloud Build is used to automatically build the Docker container image and deploy it directly to the Google Cloud Container Registry.

  • How does the video suggest testing the Docker container locally?

    -The video suggests building the Docker image locally, running it, and mapping port 8080 to test if the app works inside the container before deploying it.

  • What is the significance of the Google Cloud Container Registry?

    -The Google Cloud Container Registry is a service that helps keep track of all the containers pushed to it, allowing users to manage and deploy them easily within the Google Cloud console.

  • How can one ensure their app is updated efficiently after making changes?

    -The video suggests setting up continuous deployment by linking the GitHub repository to Google Cloud Run, so any changes pushed to GitHub are automatically deployed to the web app.

  • What is the role of Google Cloud Run in deploying the app?

    -Google Cloud Run is used to deploy the containerized app from the Container Registry, providing a public URL to access the app.

  • What does the video suggest regarding the timeout settings for the app?

    -The video suggests specifying a timeout based on the app's needs, with a default of 300 seconds (5 minutes), which can be adjusted up to 3600 seconds (30 minutes) for larger apps.

  • What are some potential issues to watch out for when containerizing an app?

    -Potential issues include runtime problems that may not have been apparent in the local environment, which is why it's important to test the app thoroughly in the local Docker container before deploying.

Outlines

00:00

🚀 Introduction to Deploying ML/DL Models

The speaker introduces a video tutorial aimed at individuals ready to deploy their machine learning or deep learning models. They mention covering everything from the user interface (UI) to deployment, making it accessible for sharing with others. The speaker references a medium article for further reading and suggests using Streamlit for UI development due to its simplicity and integration with Python. They also highlight the need for Docker, gcloud CLI, a Google Cloud billing account, and the viewer's own machine learning model. The speaker acknowledges that while they won't cover basic setup details like Docker installation, there are many resources available online.

05:01

🛠️ Containerizing the App with Docker

The speaker outlines the process of containerizing the app using Docker, emphasizing Docker's role in creating a self-contained environment for the app. They explain that this portability ensures the app will run consistently across different platforms that support Docker. The tutorial includes instructions for creating a Dockerfile, building the Docker image locally, and testing it to ensure it works before deploying. The speaker also discusses the importance of exposing port 8080, which is the default for Google Cloud Run, and provides a command for building and running the Docker container locally. They stress the importance of testing the app locally before proceeding to avoid runtime issues on the cloud platform.

10:01

🌐 Deploying to Google Cloud Container Registry

The speaker continues with the deployment process, focusing on pushing the Docker container to the Google Cloud Container Registry. They provide a command that uses the Google Cloud CLI to tag, build, and push the container to the registry. The speaker discusses the importance of setting a timeout for larger builds to prevent timeout errors during deployment. They also mention verifying the container's presence in the registry and explain how to link it to Google Cloud Run for deployment. The speaker shares their experience with large builds and the need for patience and proper configuration to ensure successful deployment.

15:02

🌟 Final Deployment and Continuous Integration

The final paragraph covers the last steps of deployment, including navigating to Google Cloud Run, creating a new service, and selecting the container image from the registry. The speaker discusses service settings such as resource allocation, unauthenticated invocations, and timeout configurations. They also touch on the efficiency of continuous deployment by linking the GitHub repository to Google Cloud Run, allowing automatic updates to the app when changes are pushed to GitHub. The speaker concludes by encouraging viewers to ask questions and offering to create additional videos on specific topics if requested.

Mindmap

Keywords

💡Machine Learning

Machine Learning is a subset of artificial intelligence that provides systems the ability to learn and improve from experience without being explicitly programmed. In the context of the video, machine learning is the fundamental technology behind the demo that the presenter is discussing. The script mentions deploying a 'machine learning or deep learning demo,' indicating that the video is aimed at individuals who have developed machine learning models and are ready to deploy them for practical use.

💡Deep Learning

Deep Learning is a branch of machine learning based on artificial neural networks with representation learning. It is part of the video's theme as the presenter is discussing a 'machine learning or deep learning demo,' suggesting that the content is relevant to those who have created complex models, possibly involving neural networks, and are looking to deploy these models for broader access.

💡Deployment

Deployment in the video refers to the process of making a machine learning or deep learning model accessible to users beyond the development environment. The script discusses various steps for deploying a model, including creating a user interface and containerizing the app, which is central to the video's educational purpose of guiding viewers through the deployment process.

💡UI

UI stands for User Interface, which is the point of interaction between users and a system. In the video, the presenter mentions developing a UI using Streamlit, a framework that allows for the creation of web apps directly from Python code. The UI is a critical component for making the machine learning demo accessible and user-friendly.

💡Streamlit

Streamlit is an open-source Python library used to create and share data apps. The video script references Streamlit as the tool for developing the UI for the machine learning demo. Streamlit is chosen for its simplicity and efficiency, allowing developers to create web apps without needing to know JavaScript, HTML, or CSS.

💡Docker

Docker is a platform that uses OS-level virtualization to deliver software in packages called containers. In the script, Docker is mentioned as a critical tool for containerizing the app locally. This step is part of the deployment process, ensuring that the app and all its dependencies are packaged together, making it portable and easy to deploy on various cloud platforms.

💡gcloud CLI

The gcloud CLI is the command-line tool for Google Cloud, used to interact with and manage resources on the Google Cloud Platform. The video script refers to the gcloud CLI as part of the process for deploying the containerized app to Google Cloud, highlighting its importance in automating the deployment process.

💡Google Cloud

Google Cloud is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products. In the video, Google Cloud is the platform where the presenter deploys the machine learning demo. The script discusses using Google Cloud services like Cloud Build and Cloud Run for deploying and managing the app.

💡Containerization

Containerization is the process of packaging software and all its dependencies into a 'container' that can run on any system that supports containers. The video script describes containerizing the app locally with Docker and then using Google Cloud Build to create a final container image, which is a key step in making the app portable and deployable.

💡Cloud Run

Google Cloud Run is a managed platform that automatically scales stateless containers. The script mentions deploying the containerized app to Cloud Run, which is where the app becomes accessible as a service with a public URL. Cloud Run is highlighted as a scalable and efficient way to deploy web applications.

💡Continuous Deployment

Continuous Deployment is the practice of automatically deploying all changes to a software application after the code passes through automated testing. The video script briefly mentions setting up continuous deployment with Google Cloud Run, which allows for automatic updates to the app whenever changes are pushed to the GitHub repository, streamlining the process of deploying updates.

Highlights

Introduction to deploying a machine learning or deep learning demo

Overview of the process from UI to deployment

Reference to a medium article for detailed instructions

Prerequisites for deployment: Docker, gcloud CLI, Google Cloud billing account, and a machine learning model

Assistance available online for setting up Docker and gcloud CLI

Introduction to Streamlit as a UI framework

Streamlit allows for quick UI development with minimal knowledge of JavaScript, HTML, or CSS

Example of a simple UI built with Streamlit in under 50 lines of code

Streamlit community and documentation as resources for support

Alternative UI framework suggestion: Radio

Step-by-step guide to containerize the app using Docker

Explanation of Docker's role in creating a self-contained environment for the app

Instructions on building and testing a local Docker container

Use of Google Cloud Build for final containerization and deployment

Importance of testing the app locally before moving to cloud platforms

Process of pushing the Docker container to Google Cloud Container Registry

Final step of deploying the app on Google Cloud Run

Options for resource allocation and timeout settings on Google Cloud Run

Continuous deployment setup with Google Cloud Run and GitHub

Access to the public URL of the deployed app

Offer for further assistance and the possibility of a follow-up video

Transcripts

play00:00

hey guys so you've got some machine

play00:01

learning or deep learning demo and

play00:04

you're ready to deploy it somewhere

play00:05

that's awesome this is the video for you

play00:08

um and we're gonna go through everything

play00:10

from the UI to getting it deployed and

play00:14

ready and available for you to use and

play00:16

share with your friends with your

play00:18

colleagues whoever you want to share

play00:20

with and however you want to use it so

play00:22

for the UI we'll we'll just jump forget

play00:25

the UI sorry we'll just jump straight

play00:26

into it I'll be referring to this medium

play00:29

article on my page I'll link it in the

play00:32

description below so you can follow

play00:33

along with me otherwise just you can

play00:36

follow along in this video by yourself

play00:37

too that works

play00:39

um jumping straight into it some of the

play00:41

things you're going to need are oh also

play00:44

this is uh what I'm referring to you may

play00:46

notice it'll be a little bit different

play00:47

this is just a draft right now by the

play00:50

time this video is up it should be

play00:51

available for everyone

play00:52

some of the things you're going to need

play00:54

to get started are just to have Docker

play00:57

installed on your system a gcloud CLI

play01:01

installed on your system a Google Cloud

play01:03

billing account enabled and your own

play01:06

python machine learning deep learning

play01:08

model that you want to get deployed if

play01:11

you need help with any of these things

play01:13

whether that's installing Docker the

play01:14

gcloud CLI you're setting up your Google

play01:16

Cloud billing account

play01:18

there's a ton of videos and support for

play01:20

that online feel free to just check

play01:23

those out yourself just for the sake of

play01:24

time and just efficiency I'm not going

play01:27

to dive into them in this particular

play01:28

video let me know in the comments so if

play01:30

you want me to cover some of those

play01:31

things and how I do them otherwise

play01:33

there's a ton of resources out there for

play01:35

you to figure out how to do that stuff

play01:36

too

play01:38

um once you've got those things set up

play01:39

we then an outline of of how this

play01:43

process goes is first we'll develop your

play01:44

UI using streamlit because it's one of

play01:48

it's it's a really awesome UI framework

play01:51

that doesn't require any knowledge of

play01:52

JavaScript or or HTML or css really it

play01:56

just integrates directly into your

play01:58

python code and you can get started in

play02:01

literally a matter of minutes it's it's

play02:03

really quick really efficient and the

play02:06

documentation available is is awesome

play02:08

they have a lot of support as well so if

play02:11

you're confused and you're looking for

play02:12

some some answers there's there's

play02:14

awesome Community around streamlit

play02:17

here's an example of my UI right here

play02:19

this is literally like it's kind of

play02:21

crazy to think that I can flesh out a

play02:24

whole UI including a login screen and my

play02:27

home page in under 50 50 lines of code

play02:30

and a lot of this is really actually

play02:33

just boilerplate it's a template a

play02:35

couple templates that I can just squeeze

play02:37

together

play02:38

if you want to find some templates or

play02:41

find documentation on how to build your

play02:43

app I've linked all of that in the blog

play02:44

you can check it out here

play02:46

here streamlined its own home page

play02:49

here's the documentation streamless

play02:52

documentation

play02:53

so yeah please check that out if you

play02:55

want an alternative to stream let's say

play02:57

it doesn't work for your particular use

play02:59

case you can check out radio it's

play03:01

another great alternative

play03:03

and please don't feel daunted or feel

play03:06

scared that oh my gosh here's another

play03:07

framework I need to learn to get my web

play03:10

app up and running I promise you it's

play03:12

it's it's extremely extremely simple

play03:15

it'll take you maybe like an hour max to

play03:19

to build out a very simple one

play03:22

um but yeah so let's let's dive into

play03:25

these steps so now that we've kind of

play03:28

talked about the UI which is streamlined

play03:30

of course let's go into step number two

play03:32

and kind of unpack what that that what

play03:35

happens there a little bit so we're

play03:36

going to need to containerize our app

play03:39

um and we're going to do this in two

play03:41

steps first we're gonna containerize it

play03:42

locally using Docker and for for those

play03:46

I'm no Docker expert but I'll explain

play03:48

the the little understanding that I have

play03:51

on it

play03:52

um basically from what I understand

play03:54

Docker abstracts your app to its own

play03:58

it's kind of like a virtual environment

play03:59

as you can say for your app in

play04:02

particular that works inside of itself

play04:05

it's self-contained to the point where

play04:07

once you know it works in that container

play04:09

you can move that container around it's

play04:11

very transportable so you can move it if

play04:13

you want to have it on AWS or if you

play04:16

want to have it on Google Cloud because

play04:18

you know it works in this container and

play04:20

it has all the dependencies it needs in

play04:21

this container it can go and work

play04:23

anywhere else that supports these Docker

play04:25

containers and because Docker is widely

play04:27

used it's it's a very high likelihood

play04:29

that it will be supported

play04:32

um and so for this particular case we're

play04:35

going to do it in two steps we're going

play04:36

to build a local Docker container test

play04:38

it locally make sure it works inside

play04:40

this container and then we're gonna

play04:42

actually use Google Cloud's

play04:44

um the gcloud CLI and Google Cloud build

play04:47

which I will reference here

play04:50

Google Cloud build and right now it's

play04:52

not in the blog but I think I should add

play04:53

it because it's a key step but we're

play04:55

going to use Google Cloud build to help

play04:57

build our final container which and

play05:00

it'll automatically build this image and

play05:03

deploy it directly to

play05:05

a Google Cloud Google Cloud container

play05:09

registry which is a registry that helps

play05:12

you keep track of any and all containers

play05:14

that you push to there and you can

play05:17

figure out how to use them however you

play05:18

want inside of the Google Cloud console

play05:21

itself

play05:22

so the commands for this are here so

play05:25

Docker

play05:27

um sorry streamlit has extensive

play05:29

documentation on how to deploy with

play05:31

Docker right here

play05:33

and you can check this out um but they

play05:36

they walk you through deploying a very

play05:37

simple web app

play05:40

um using docker we're going to make a

play05:42

few adjustments for this use case I

play05:44

would highly recommend checking this out

play05:46

if this is your first time doing it

play05:48

it'll just help you become more familiar

play05:50

with the process and and make little

play05:52

changes of your own for your use case

play05:55

here's the docker file that I wrote for

play05:57

mine and this is kind of like it's

play06:00

basically just a a copy of this with

play06:04

some minor changes and those minor

play06:07

changes are I'll explain them now is

play06:09

first I've exposed port 8080 both here

play06:12

um in the expose here and in this entry

play06:14

point because what Google Cloud run does

play06:17

by default is it runs on port 8080 so

play06:20

you're going to want to specify this

play06:22

just so you don't run into any startup

play06:24

issues in the beginning

play06:26

although you can't change Google Cloud

play06:30

runs default Port later on but just to

play06:33

save you time let's just specify it from

play06:35

the start so you can use your app as

play06:37

soon as possible

play06:38

and once you've specified your Docker

play06:40

file

play06:41

um we're going to build that image

play06:43

locally using this Command right here

play06:45

Docker build Dash T and then image name

play06:47

can be whatever you want it to be

play06:50

um it's not it it doesn't it's it

play06:52

doesn't really matter and excuse me

play06:54

there should be a space here and don't

play06:56

forget this period just hit enter and

play06:58

it'll build that container for you then

play07:01

you're gonna run it and we're gonna test

play07:03

to make sure that it works inside that

play07:05

container locally using this we're going

play07:08

to specify the port 8080 we're going to

play07:10

map port 8080 on our machine support

play07:11

8080 in this Docker container and we'll

play07:14

run it we'll specify the name of the

play07:16

container which you just created

play07:19

um this is a really important step make

play07:22

sure it works here locally before you

play07:24

move on anywhere else otherwise if it

play07:27

doesn't work in this container it's not

play07:29

going to work on Google Cloud run it's

play07:30

not going to work on AWS so just make

play07:32

sure that you've got everything working

play07:34

in my case

play07:35

um there were a few errors issues not

play07:37

particular errors but runtime issues

play07:39

that I came into

play07:41

with my app when I tried containerizing

play07:43

it and I I was stubborn and tried

play07:46

deploying it without fixing them

play07:48

thinking it would just magically work

play07:49

but it won't just spend spend a little

play07:52

bit of time making sure it works in in

play07:54

your local Docker container before

play07:56

moving on to the next step

play07:58

sweet and the next step is the final

play08:02

Docker Bill final build of your

play08:04

container and pushing it to

play08:07

um the Google Cloud container registry

play08:09

which I will link here in the blog as

play08:11

well this is the container registry so

play08:13

we're going to use this command which is

play08:15

it uses the Google Cloud CLI which

play08:18

you've installed and what this does is

play08:20

it tags and builds your Docker container

play08:25

and automatically pushes it to the

play08:28

Google Cloud container registry which

play08:30

you can then link or or reference from

play08:33

Google Cloud run you can reference that

play08:34

specific container and then so say like

play08:37

Google Cloud runs here actually I'll

play08:39

show you I'll show you an example in my

play08:41

case but yeah you can reference that

play08:43

container which you pushed to the to the

play08:45

registry inside Cloud run link it and

play08:47

then deploy it from cloud run I'm using

play08:50

this command so this project ID what

play08:52

this is is I'll go to my services right

play08:54

here you'll create your Google Cloud

play08:56

billing account and

play08:59

um wherever you are if you're in Cloud

play09:00

run or if you're in you can even be in

play09:03

the compute engine area you're always

play09:05

going to have this header bar you can

play09:06

just click this and whatever your

play09:09

project name is here's the ID and you're

play09:12

going to copy that

play09:14

and you're going to come on over and

play09:16

swap it for this value right here and

play09:19

some project name once again this can be

play09:20

anything you like

play09:22

in my case I named it like app.container

play09:25

or something like that or app dash

play09:26

container and then this is an important

play09:29

one I maybe I mentioned I forgot I'm

play09:32

like

play09:33

kind of spacing out a little bit but I'm

play09:35

not building this particular project

play09:37

with you guys because in my case it's a

play09:40

pretty large build there's a five

play09:41

gigabyte checkpoint file for my project

play09:43

which takes a long time to deploy which

play09:47

is why I'm just walking you guys through

play09:48

what I've done but because my project

play09:52

was so big I kept running into timeout

play09:55

errors so it's really important if your

play09:57

project is larger to specify a timeout

play09:59

otherwise it'll just it'll just keep on

play10:01

failing so I was kind of just stubborn

play10:03

and put a two hour timeout so that I

play10:05

didn't have to worry about it timing up

play10:08

now once you run this command it'll

play10:10

it'll do everything automatically and

play10:12

the final result should be something

play10:14

like this so you can come here I'm just

play10:16

going to search for the container

play10:17

registry and here it is I guess it's

play10:19

under the CI CD section I'm just going

play10:22

to click container registry and the

play10:24

final result should be something like

play10:25

this and in my case it's called

play10:27

captionit container and this name Will

play10:29

coincide with whatever you choose to

play10:31

name it here here's some project name

play10:33

and that'll be the final result

play10:36

you can one once once the once this

play10:39

command finishes running just hop on

play10:40

over to your container registry and

play10:42

verify that your container is there and

play10:45

once you've done that we can move on to

play10:47

the last and final step which is getting

play10:50

your app deployed this is what we want

play10:52

this is why we want to be

play10:54

um congratulations if you made it to

play10:55

this point let's push on forward and get

play10:57

your app out there so now we're going to

play11:00

navigate over to Google Cloud run

play11:04

um I have mine pinned over here

play11:05

otherwise you can just search for it

play11:08

and here you see my app streamlined I

play11:10

named it streamlit um you can name it

play11:12

whatever you want

play11:13

um you're not going to see anything here

play11:15

to start off with you're going to

play11:16

actually have to create it so let me

play11:18

just expand this a little bit you're

play11:21

gonna have to create click this button

play11:22

create service

play11:24

and then inside here your container

play11:27

image URL don't worry you don't have to

play11:29

memorize anything or find some URL you

play11:31

can actually just select and here it'll

play11:34

link that container registry like I

play11:36

talked about you should see something

play11:37

like this which is a reference to that

play11:39

container registry that I taught that I

play11:41

showed you guys before here's my

play11:43

container registry and here are a few

play11:44

images in my container registry in your

play11:47

case I don't know how many you'll see I

play11:49

think you should just see one because I

play11:51

I did this process quite a few times I

play11:53

created a few images but you should just

play11:55

see one so you can select that and then

play11:57

hit select and that'll be your your

play12:00

containerized app

play12:02

you can give it a name

play12:04

um here this this uh this particular

play12:07

section if it uh it helps you save money

play12:10

by allocating the CPU only or or the

play12:13

resources CPU Ram whatever only when the

play12:16

app is called so that way when there's

play12:17

downtime no one's on your app you're not

play12:19

wasting money

play12:20

um with with uptime

play12:24

um

play12:25

you're going to want to check allow

play12:27

unauthenticated invocations what this

play12:29

does is it allows just anyone to access

play12:32

your url so you share it just like a

play12:34

normal website if you don't want that

play12:37

you can of course click this require

play12:39

authentication

play12:41

um

play12:42

and then another thing you can go down

play12:44

here if you might you may need more

play12:46

resources so here is a section where you

play12:48

can specify the port like I said 8080 is

play12:51

specified by by default

play12:54

um one important area is because once

play12:56

again my app was larger I was using an

play12:58

open source AI Transformer I wanted more

play13:01

CPU resources so you can just actually

play13:04

specify up to eight cores or eight V8 V

play13:08

CPUs

play13:10

um whatever that means and how up to 32

play13:12

gigabytes of RAM this timeout what this

play13:16

is is

play13:18

after 300 seconds we can check how much

play13:20

that is 300 divided by 16. so after

play13:25

about five minutes

play13:27

based on this 300

play13:29

um your app is going to time out and you

play13:31

you'll have to hit the refresh button

play13:32

for it to start up again you can specify

play13:35

this up to 36 100 which is I think 30

play13:39

minutes

play13:40

um so for a 30 minute timeout

play13:42

so yeah you can you can mess around with

play13:44

these these settings up to your

play13:45

preference

play13:46

and then eventually when you're done you

play13:48

can hit the create button and when you

play13:52

hit that create button

play13:54

it should take a little bit to build

play13:57

that container deploy it and but it

play13:59

should do it all automatically you won't

play14:00

have to do anything else and eventually

play14:02

you'll see this green check mark you'll

play14:05

have your own service created and then

play14:08

here will be your service details and

play14:10

you'll be provided a URL right here this

play14:13

is a public URL that'll allow you to

play14:15

access your personal app so we can click

play14:18

that which is mine

play14:21

um and once again it's just starting up

play14:23

so it'll take a take a little bit

play14:25

um and here's my streamlit app starting

play14:27

up

play14:29

but yeah you should have access to

play14:31

revisions the really cool thing about

play14:32

Cloud run is if you make any changes you

play14:35

can redeploy your app once again just

play14:37

using that um command that I showed you

play14:39

over here uh this command you can send

play14:42

it back up create a new container and

play14:45

then

play14:46

um it you can you can link it as a new

play14:49

revision or something and you can always

play14:51

redeploy

play14:52

and you'll have your updated web app the

play14:55

thing is though that's that's

play14:56

inefficient because say in my case it

play14:58

took me like

play14:59

I don't know like 30 minutes each time

play15:02

that to get it up and deployed that's

play15:04

inefficient you can actually set up this

play15:06

thing edit continuous deployment right

play15:07

here and what this does is it allows you

play15:09

to hook up your GitHub repository

play15:12

to Google Cloud run and then you can

play15:14

push like right here this is my code

play15:16

which is linked to GitHub any changes I

play15:19

make here I can push to GitHub and then

play15:21

the Google Cloud run service will

play15:24

automatically pull those changes from

play15:25

GitHub and then

play15:28

um it'll it'll show those changes on

play15:30

your web app I can make a separate video

play15:32

on this I've I've got it set up for me I

play15:34

can set up I'll probably make a separate

play15:36

video on this later let me know if if

play15:38

that's something you want urgently

play15:40

um and I can I can do that video sooner

play15:43

but that's something I plan to make it's

play15:44

a very extremely efficient way of of

play15:48

um of making changes to your app

play15:50

yeah that's basically the principle you

play15:52

can look into it yourself of course

play15:55

um but yeah and it's still running

play15:58

um like I said my app's a little larger

play16:00

so it takes a little bit but yeah I'll

play16:02

just exit out of here you'll have your

play16:04

own public URL to view your app but uh

play16:07

that should be about it honestly for

play16:08

this process I I hope it's this

play16:10

straightforward for you

play16:12

um let me know in the comments if you

play16:13

have any questions I'll do my best to

play16:16

help you I I want to make sure that you

play16:18

guys get to this point as well so please

play16:20

yeah let me know if there's anything you

play16:22

need

play16:23

um Let's uh we'll do what we can take

Rate This

5.0 / 5 (0 votes)

関連タグ
Machine LearningDeep LearningStreamlit UIGoogle CloudDocker ContainerCloud DeploymentPython ModelAI DeploymentStreamlit AppContinuous Deployment
英語で要約が必要ですか?