Could anyone please tell me the steps to deploy streamlit app on Microsoft Azure
The steps depends. Do you wan’t the fastest way to get on Azure with a hoppy project or something you can use robustly for your work over a longer period of time?
I’ve deployed awesome-streamlit.org via Azure and I’ve chosen something robust and automated.
- Azure DevOps Repo
- Docker (expose your Streamlit App on port 80). Dockerfiles
- Docker Hub as my container registry. Registry
- Azure DevOps Pipelines for CI/ CD yaml files, My CI/ CD Setup
- Azure Web App for containers (configure “Always on” to True). Overview
folderWatchBlacklist = ['']in the config.toml file
This takes some time to setup. When it’s done it’s amazing. When I merge into MASTER everything is automatically built, tested and deployed. And I can replicate everything and debug locally in an identical Docker container.
An easier way would (I think) be with an Azure Web App. But I’ve never tried that. For small hobby projects I’ve used Heroku before with success.
I have the same problem. The solution is to embed the ping part in your python code?
thanks for posting on the forum. I haven’t personally tried on Azure, but @Marc’s answer is excellent. I do deploy Streamlit on Google Cloud routinely and the only caveat I have is making sure that Websocket does not need a special configuration. For the rest it should work fine. I know people have had lot of success deploying on Heroku as well and I have seen several Streamlit apps on Heroku.
Hi @sojohan, thanks for posting. Can you elaborate a little bit more on your specific problem? On top of my head, I don’t think you need anything special with the ping.
I’m sorry. But I don’t understand the question. Could you elaborate it?
Marc’s answer is excellent, thx!
If your deployed Azure web app still hangs on “Connecting…”, like mine was, make sure you have no Cors enabled, not even “*”
To add another source of information about Azure:
Richard Peterson over at Towards Data Science just published a how-to on deploying Streamlit to Azure.
Thanks for sharing Heroku. It is simpler.
I managed to deploy via AWS EC2 and Heroku via docker. How difficult it is to port the same thing to Azure? It’s a simple ML prediction app that uses sklearn, panda and numpy.
Would it be ok if I follow this tutorial ?
I have not tried following the tutorial, so I would not know. My guess though is that it would be ok.
You can see my Docker container and azure pipelines files here.
They might be of use.