Deploying Dash app in Azure, remains Loading - python

I`m trying to deploy a simple Dash App in Azure, and I followed the tutorial below:
https://www.phillipsj.net/posts/deploying-dash-to-azure-without-using-docker/
It works perfectly in my localhost, but when I try to deploy it in Azure the site shows only the message: Loading...
If I try to deploy a Flask App in Azure (https://medium.com/#nikovrdoljak/deploy-your-flask-app-on-azure-in-3-easy-steps-b2fe388a589e) it works perfectly fine.
Could you please give me any indication why this migh happen? Is there any difference between deploying Flask and Dash in Azure?
Thank you in advance

First of all, I recommend you test all the applications locally before you publish it to the Azure Web App. If it does not work fine locally, fix it until it succeeds. For the link you provided in the question, I test it on my side and it does not work fine. With checking, it loses the package dash-renderer. So you can install it and freeze it into the requirements and test it locally. Or directly append it into the requirements.txt:
dash-renderer==0.13.0
Then publish it to the Azure Web App and it will work fine like this:
If you have any more questions, please let me know.

Related

deploy first django test app to anywhere (azure or heroku)

tldr; - When I have deployed a flask app in the past, it uses a requirements.txt file in the main root of the project folder so that azure or heroku can understand what modules need to be installed. However, this is the first time I am messing with django. I am trying to test deploy to azure or heroku but I azure can't detect the stack of the app because there is no requirements.txt file in the main root of the folder.
From messing with django a little bit, it seems alot more complicated than flask. What can I do to test deploy the most basic app to azure app services or heroku or aws or any place in general?
I tried deploying the django app like I normally do with flask but received an error:
Could not auto-detect the runtime stack of your app.
HINT: Are you in the right folder?
For more information, see 'https://go.microsoft.com/fwlink/?linkid=2109470'
Here is a picture of what I am seeing on my side:
I would assume I am not in the right folder but I am not sure if that is the problem completely.
Here is app I am testing myself. Its a microsoft authenication test app where you can test your xbox live account, microsoft school account, or microsoft work account against the webpage: https://github.com/Azure-Samples/ms-identity-python-django-tutorial
**Of course I added the app registration information from azure. Infact, the same app registration information works on my flask app so any azure app registrations issues is probably not the issue. **
The repo you link contains multiple projects. It sounds like you need to clone this, then move one of the project sub-directories (which should have its own requirements.txt already) into a fresh working tree, initialize a new repo there, and then push that to the cloud provider.

Difficulty in deploying ML model to Heroku

Any help would be much appreciated. I created a repository here where all files are linked. I'm currently trying to learn how to deploy an ML model to Heroku. This is a pretty simple model and I was following along with a YouTube tutorial. When I run 'python app.py' on my terminal, the local server does run correctly, showing the exact interface I want.
When trying to deploy it on Heroku, I linked my GitHub repository and selected 'Deploy Branch'; Here, Heroku states that the app was successfully deployed. HOWEVER, when I then try to view, a page comes up stating Application Error.
As mentioned, I'm really not sure what's going wrong and would appreciate any guidance to get this working – I'd like to deploy other ML models I've been working on and getting this preliminary one running would be a huge help. Any advice?
Thanks!
It seems like you have forgotten to create the Procfile. This is necessary for Heroku as it tells Heroku how to startup your application on it's servers.
Since you're server file is app.py and the Flask app is app as well, the following would be the contents of the Procfile
web: gunicorn app:app
Also update your requirements.txt file by adding gunicorn, as an example what i had was
gunicorn==20.1.0
For more information about the Procfile see https://devcenter.heroku.com/articles/procfile
I have deployed this personally and it works fine now 😁

How to deploy python FLASK API?

I have created a api using flask in python. I am done with development. Now I want to deploy it. Can anyone help me that where can i deploy my api and how?
There are many services(PaaS) that you can use to deploy your app. I personally use heroku.
You can use AWS also from the free tier account. If you just google you will find many options( OpenShift, CapRover, Digital Ocean,etc)
You can try the deployment of flask api with Ubuntu .

Flask web application deployment in AWS

So when i run the application in amazon instance it tries to get the data from google inthis image
when it goes to the callback this is the output i get
I have run an python application with google Oauth2 and ran it successfully locally. Gunicorn serves http and google Oauth2 requires hhtps. I locally used certificates i have generated and it worked successfully, but when i try to deploy in Amazon Ec2 instance, it doesn't work. Did anyone face such kind of problem? will using nginx be helpfull in that case?

Can one source code be deployed to Openshift, Heroku and Google App Engine at once?

As subject, is is possible with just one source code, we can deploy our code to Openshift or Google App Engine? Heroku is not necessarily in my case.
My application is using Python Flask + PostgreSQL 9.1. I love the easiness in Openshift when I configure my technology stack, but is the case will be same with GAE?
Thanks!
I work on Openshift and at this time I'm not aware of anything that will deploy your code to GAE and Openshift at the same time.
You might be able to write your own script for it.
PostgreSQL is not available on GAE, so this code will definitely not run there.

Categories

Resources