I am struggling to start a simple Gradio app in Azure after a successfull deployment of the App Service.
The MS documentation says to create a custom startup for python frameworks that are not running on Gunicorn.
So i tried several options just adding a line : python app.py
in the startup command field in App configuration but the container failed starting.
Any idea , please ?
Error in log :
2023-09-06T08:34:02.022Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 138.7764496 sec
2023-09-06T08:34:17.097Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 153.8518121 sec
2023-09-06T08:34:33.792Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 170.5465454 sec
2023-09-06T08:34:48.868Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 185.6226552 sec
2023-09-06T08:35:03.946Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 200.7001212 sec
2023-09-06T08:35:19.016Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 215.7710773 sec
2023-09-06T08:35:34.091Z INFO - Waiting for response to warmup request for container whatschatgui_0_672c2d81. Elapsed time = 230.8458043 sec
2023-09-06T08:35:34.098Z ERROR - Container whatschatgui_0_672c2d81 for site whatschatgui did not start within expected time limit. Elapsed time = 230.8530481 sec
2023-09-06T08:35:34.115Z ERROR - Container whatschatgui_0_672c2d81 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.
2023-09-06T08:35:36.786Z INFO - Stopping site whatschatgui because it failed during startup.
This the way I managed to solve this issue: I didn't find any solution lo launch Gradio directly with an Azure startup command ( on my laptop a simple "python app.py" works). I replaced then the gradio "launch()" by "mount_gradio_app()" method to start the application in a FastAPI app. https://www.gradio.app/docs/mount_gradio_app It seems it is because only python web application running on Gunicorn or Unicorn web server can be started in an Azure App Service. But I don't have a clear documentation on that , so this is only my assumption. Hope It helps. Thank you