I have a streamlit app that runs perfectly locally but is not possible to deploy it. I have this line:
cmd = ['az', 'login']
result = subprocess.run(cmd, capture_output=True, text=True)
that opens a web browser locally but when I deploy it it does not open any browser, and keeps running forever.
Typically when running apps locally, the app may leverage the multi-thread presented on a local computer. However, when hosted on a cloud server running on a single CPU core, it may consume all the available resource.
It seems that you want to run a command line
subprocess.run(). I’ve performed something similar in a Streamlit app that runs an R script in the command line but instead of
run, I’ve used
Popen. Check out the following video and code repo:
Hope this helps!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.