Great tutorial! Thank you so much. I followed step by step but deployment always fails. Revision 'cl-dashboard-internal-00001-lm8' 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. Logs for this revision might contain more information.
Thank you for this tutorial! I successfully deployed my app on cloud run. One question I have, do I use the same deploy command to push any code changes? I tried that and saw a the updated revision, but seems like it keeps pointing back to the old one. I need to add my secrets.toml in the .streamlit file
Thankyou for the tutorial. But i want to make two modifications here for the users. 1. In Dockerfile write. update python version Python: 3.x.x , coz with Python: 3 some of the libraries were not installling in VM. 2. Dont make virtual environment and then link to gcp, it will upload libraries as well and pop TIMEOUT error in gcp. Silly mistakes but not for newbies :P
the cost of could run vs app engine, which one is cheaper? I deploy my app to app engingee ,they charge me 6 $ for 1 day. It is so expensive to me. How much do you pay for cloud run?
Google Cloud Run should be significantly cheaper. See more information here: cloud.google.com/run/pricing. The benefit of Cloud Run is that it has a time-out feature, whereby it stops the service when no-one is accessing your application. This should save money for small-scale applications. In addition, the first two million calls are free. The downside of using Cloud Run is that it performs docker run to activate the app, meaning load up times are slowly. You can increase the memory to 2 GB and add an additional CPU (to 2) to make this start-up faster.
I've seen many tutorials on deploying streamlit on different platforms. yours is TOP!! really thorough, professional and many good practices you show along the way. Thanks man, really helpful
Thank you so much. I really appreciate your feedback. I am very happy that you enjoyed the video and you took the time to leave a comment. This means a lot to me. Thank you again
Thank you for the tutorial. Have you had any issues with google blocking the health check url? I get errors with streamlit trying to use /_healthcheck which google blocks.
Hi, I believe that when I uploaded the video the multi page feature was not yet available. I'll need to look into that but I am currently quite busy so it may take me some time. The prices should be quite similar. I don't see why it should be very different.
This tutorial is the best. It covered everything from scratch. Learned many good practices (including the main thing: deploying a streamlit application) from the detailed walkthrough. Thank you for this awesome tutorial.
Thank you very much for sharing. I am guessing the data used to build the application was sourced from the web through the python code you used from the Streamlit site. What if data lives on your local machine? How will you create the application so that it is reading your data from your local machine? Will you have to create the data file and make it part of the environment project directory?
Hey Federico, whenever I do the gcloud run deploy I get an error: Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Are you familiar with that error?
@@FedericoTartarini Thank you for the quick response! And for the video in general! Yes, I have followed it step by step. I have it all in an environment that I already had with another app.py script. But that should work regardless, at least I thought so hehe. Could that be a problem?
@@FedericoTartarini Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'. As a result, 'server.enableCORS' is being overridden to 'true'. Could this be the problem? Was shown in the error logs.
Gloud is not an internal or external.... Error is there Could you please help me to deploy my streamlit app Which is running properly on localhost but giving error online
Could you please share more information about the error you are getting? Have you followed all the instructions in the video and made sure there are no typos in the config files?
Thank you for this tutorial!! I wasa able to deploy my app in gcp. However, I am having issue with the app, It just stuck in "please wait".. have you encounter this?
@@FedericoTartarini thanks matee, it is working now. However, I am encountering a problem with streamlit web socket. my app refresh everytime it reaches the server timeout period of 300sec
@@FedericoTartarini Hello thank you for your reply. I appreciate it. I'm confused, so every user in the web has a certain duration only?? then the server reinitialize??
Error: (gcloud.builds.submit) The user is forbidden from accessing the bucket [ streamlit-app-3******_cloud build].Please check your organization's policy or if the user has the "serviceusage.services.use" Permission How can i solve please help
It means that the account that you are using doesn't have the permission to do that action. You need to activate a gcluod account as shown in the video
Great tutorial! Thank you so much. I followed step by step but deployment always fails.
Revision 'cl-dashboard-internal-00001-lm8' 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. Logs for this revision might contain more information.
Thank you for this tutorial! I successfully deployed my app on cloud run. One question I have, do I use the same deploy command to push any code changes? I tried that and saw a the updated revision, but seems like it keeps pointing back to the old one. I need to add my secrets.toml in the .streamlit file
If i make changes in code how will it be rendered in app or i have to repeat this process again?
Thankyou for the tutorial. But i want to make two modifications here for the users.
1. In Dockerfile write. update python version Python: 3.x.x , coz with Python: 3 some of the libraries were not installling in VM.
2. Dont make virtual environment and then link to gcp, it will upload libraries as well and pop TIMEOUT error in gcp.
Silly mistakes but not for newbies :P
Thank you so much for the feedback
Sir even though my gcp is not biling enabled, can i still deploy my streamlit app with this cloud run?
No you need to enable the billing
the cost of could run vs app engine, which one is cheaper? I deploy my app to app engingee ,they charge me 6 $ for 1 day. It is so expensive to me. How much do you pay for cloud run?
Google Cloud Run should be significantly cheaper. See more information here: cloud.google.com/run/pricing.
The benefit of Cloud Run is that it has a time-out feature, whereby it stops the service when no-one is accessing your application. This should save money for small-scale applications. In addition, the first two million calls are free. The downside of using Cloud Run is that it performs docker run to activate the app, meaning load up times are slowly. You can increase the memory to 2 GB and add an additional CPU (to 2) to make this start-up faster.
I've seen many tutorials on deploying streamlit on different platforms. yours is TOP!! really thorough, professional and many good practices you show along the way. Thanks man, really helpful
Thank you so much. I really appreciate your feedback. I am very happy that you enjoyed the video and you took the time to leave a comment. This means a lot to me. Thank you again
thanks!, i didn't understand where you define the cloud run service, can you explain me? could you update this tutorial using terraform?
Much has changed in the last two years.
I should try to record a new video.
Thank you for the tutorial. Have you had any issues with google blocking the health check url? I get errors with streamlit trying to use /_healthcheck which google blocks.
can you please let me know how to deploy multipage streamlit app to cloudrun. Thanks in advance. Hoping a response
Hi, I believe that when I uploaded the video the multi page feature was not yet available. I'll need to look into that but I am currently quite busy so it may take me some time. The prices should be quite similar. I don't see why it should be very different.
This tutorial is the best. It covered everything from scratch. Learned many good practices (including the main thing: deploying a streamlit application) from the detailed walkthrough.
Thank you for this awesome tutorial.
Glad it helped! Thank you so much for taking the time to write a comment, comments like yours mean a lot to me.
Followed your steps and was able to get the app running on Cloud Run , thanks for all the help 👍
Great to hear!
Thank you very much for sharing. I am guessing the data used to build the application was sourced from the web through the python code you used from the Streamlit site. What if data lives on your local machine? How will you create the application so that it is reading your data from your local machine? Will you have to create the data file and make it part of the environment project directory?
Yes you can add a database or a csv inside the project files and directly read the data from there.
@@FedericoTartarini Thank you very much for your feedback. Great video.
Hey Federico, whenever I do the gcloud run deploy I get an error:
Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable.
Are you familiar with that error?
Hi, have you followed all the steps, point by point as shown in the video?
@@FedericoTartarini Thank you for the quick response! And for the video in general!
Yes, I have followed it step by step. I have it all in an environment that I already had with another app.py script. But that should work regardless, at least I thought so hehe. Could that be a problem?
@@FedericoTartarini
Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'.
As a result, 'server.enableCORS' is being overridden to 'true'.
Could this be the problem? Was shown in the error logs.
Yes it could be. However, unfortunately it is very hard for me to determine what is causing the issue without having a lot at the code.
Did you ever solve this? I am getting stuck on the same error.
Gloud is not an internal or external....
Error is there
Could you please help me to deploy my streamlit app
Which is running properly on localhost but giving error online
Could you please share more information about the error you are getting? Have you followed all the instructions in the video and made sure there are no typos in the config files?
Your latest message was automatically deleted.
Have you any idea how to deploy telegram bot to Cloud Run?
Sure, you can start by watching this video. The process will be very similar ua-cam.com/video/jzwMzUAAOWk/v-deo.html
Thanks for your video, very educational and informative!!!!
Thank you so much.
Very good video! Is it possible to move this app to a custom domain?
Thank you. Yes, it is. You just have to setup a custom domain using Google Cloud Run.
Thank you for this tutorial!! I wasa able to deploy my app in gcp. However, I am having issue with the app, It just stuck in "please wait".. have you encounter this?
Yes, sometimes that happens. Just refresh the page and should fix the issue.
@@FedericoTartarini thanks matee, it is working now. However, I am encountering a problem with streamlit web socket. my app refresh everytime it reaches the server timeout period of 300sec
I have not looked into it and maybe you can change that but I believe it is normal
@@FedericoTartarini Hello thank you for your reply. I appreciate it.
I'm confused, so every user in the web has a certain duration only?? then the server reinitialize??
@@FedericoTartarini I think I found the problem. GCP need return a request?? how can I do it?
Error: (gcloud.builds.submit) The user is forbidden from accessing the bucket [ streamlit-app-3******_cloud build].Please check your organization's policy or if the user has the "serviceusage.services.use" Permission
How can i solve please help
It means that the account that you are using doesn't have the permission to do that action. You need to activate a gcluod account as shown in the video
Grazie Federico, video molto chiaro e utile!
Mi fa molto piacere. Grazie
thank you so much
You're welcome!
You are a true hero! Saved my day!!
Thank you very much. I am glad it helped you.
Hey, to update the deployed app, what should i do ? rerun the code against (
gcloud builds submit --tag gcr.io/)?
Hi Toan to update the application just re-run the code to build and deploy the application.