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?
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…
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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.