Streamlit prototype/staging environment on gcp

Hi everyone,
i’m trying to set up a “staging” environment inside a notebook hosted on vertex ai, based on a custom docker container.
I would like to have the opportunity to work as in local environment, also in the cloud from google. This mean that i can see the “real time” changes I’m doing in the code in the localhost:8501 page, without doing a deploy (by app engine or cloud run). Is it possible to do something like this?

If we work in local PC, we can see real time changes by simply run “streamlit run app.py”… how can i replicate this behavior in the environment of vertex ai in gcp?

thanks

Your deployed application knows nothing about your local environment. But if you are able to edit the code in the deployment environment, that should do.

Thanks for the answer!
But is there a way for running “streamlit run NAME.py” inside docker image build on vertex jupyer lab? In the docker i have exposed only 8080 port, but streamlit needs another one (like 8501)… how can i get into the localhost for check how my streamlit app is building while I’m coding it? Thanks

I don’t think I understand your question. If your application is running, you already know how to do that or something equivalent. If it isn’t, then real time updates are not your problem… yet.

Streamlit can run on any port, but I don’t understand what you mean by localhost here. Usually it is your local machine, but if you log in to a remote computer, let’s say using ssh, from there localhost will be the remote computer. So localhost can be anything.

Sorry for my horrible explanation… i’m looking for a way to create a staging environment inside jupyter lab in a notebook on vertex ai… when you work in local and you want to see real time changes, you can just open the browser in localhost:8501 and, by clicking rerun, every time there is a saved change you can see how it results in the localhost.

I would like to replicate the same behavior inside gcp without make a dockerfile and deploy it to cloud run o app engine…

Is it possible? thanks

I think the behavior is always the same. If you change the code, you will see the result of the changes in the next rerun.

I don’t know how (or even if) you can change the code that streamlit is running in a staging environment inside Jupyter lab in a notebook on Vertex AI, with or without making a dockerfile.

me too! thanks anyway for your interest!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.