How to deploy a streamlit application on Azure App Service (WebApp)

Kumar Shanu 96 Reputation points
2023-12-29T07:12:56.71+00:00

Deploy streamlit based python application to Azure app service without using Docker.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
0 comments No comments
{count} vote

6 answers

Sort by: Most helpful
  1. Sidhharth Sahu 0 Reputation points
    2024-10-16T03:50:39.38+00:00

    i followed all these steps but still i am getting below error

    2024-10-15T18:38:23.408988756Z /opt/startup/startup.sh: 23: ./azure/startup.sh: not found/home/LogFiles/2024_10_15_lw1sdlwk0000WW_docker.log (https://pnid2graph-chfcadefgpevbhc7.scm.eastus2-01.azurewebsites.net/api/vfs/LogFiles/2024_10_15_lw1sdlwk0000WW_docker.log)

    2024-10-15T18:38:21.544Z INFO - Initiating warmup request to container pnid2graph_0_747e835e for site pnid2graph

    2024-10-15T18:38:24.033Z ERROR - Container pnid2graph_0_747e835e for site pnid2graph has exited, failing site start

    2024-10-15T18:38:24.047Z ERROR - Container pnid2graph_0_747e835e didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.

    2024-10-15T18:38:24.084Z INFO - Stopping site pnid2graph because it failed during startup.

    2024-10-15T18:38:29.3445073Z Container is terminating. Grace period: 0 seconds.

    2024-10-15T18:38:29.4643745Z Stop and delete container. Retry count = 0

    2024-10-15T18:38:29.4656493Z Stopping container: pnid2graph_kudu_ff2c4c6d.

    2024-10-15T18:38:29.6666298Z Deleting container: pnid2graph_kudu_ff2c4c6d. Retry count = 0

    2024-10-15T18:38:30.5515282Z Container spec TerminationMessagePolicy path

    2024-10-15T18:38:30.5540530Z Container is terminated. Total time elapsed: 1191 ms./home/LogFiles/2024_10_16_lw1sdlwk0000WW_default_docker.log (https://pnid2graph-chfcadefgpevbhc7.scm.eastus2-01.azurewebsites.net/api/vfs/LogFiles/2024_10_16_lw1sdlwk0000WW_default_docker.log)

    2024-10-16T03:39:40.100291557Z '

    2024-10-16T03:39:40.370496816Z Could not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'

    2024-10-16T03:39:40.371920216Z Could not find operation ID in manifest. Generating an operation id...

    2024-10-16T03:39:40.373345516Z Build Operation ID: d024b308-ee5d-46d4-a737-5f2532098e30

    2024-10-16T03:39:41.580829538Z Oryx Version: 0.2.20240619.2, Commit: cf006407a02b225f59dccd677986973c7889aa50, ReleaseTagName: 20240619.2

    2024-10-16T03:39:41.625217653Z Writing output script to '/opt/startup/startup.sh'

    2024-10-16T03:39:41.736836585Z WARNING: Could not find virtual environment directory /home/site/wwwroot/antenv.

    2024-10-16T03:39:41.736871787Z WARNING: Could not find package directory /home/site/wwwroot/oryx_packages.

    2024-10-16T03:39:42.085089020Z /opt/python/3/bin/python: No module named streamlit/home/LogFiles/2024_10_16_lw1sdlwk0000WW_docker.log (https://pnid2graph-chfcadefgpevbhc7.scm.eastus2-01.azurewebsites.net/api/vfs/LogFiles/2024_10_16_lw1sdlwk0000WW_docker.log)

    2024-10-16T03:39:32.440Z INFO - Status: Downloaded newer image for 10.1.0.5:13209/appsvc/python:3.10_20240619.2.tuxprod

    2024-10-16T03:39:32.475Z INFO - Pull Image successful, Time taken: 234 Seconds

    2024-10-16T03:39:33.553Z INFO - Starting container for site

    2024-10-16T03:39:33.559Z INFO - docker run -d --expose=8000 --name pnid2graph_0_d22839d8 -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e WEBSITE_SITE_NAME=pnid2graph -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=pnid2graph-chfcadefgpevbhc7.eastus2-01.azurewebsites.net -e WEBSITE_INSTANCE_ID=6c9ba21b5e2356f008e549e79113debfd8cea3ee57f8aa4e877bbba72e1af0ca appsvc/python:3.10_20240619.2.tuxprod REDACTED

    2024-10-16T03:39:33.559Z INFO - Logging is not enabled for this container.Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.

    2024-10-16T03:39:37.458Z INFO - Initiating warmup request to container pnid2graph_0_d22839d8 for site pnid2graph

    2024-10-16T03:39:43.239Z ERROR - Container pnid2graph_0_d22839d8 for site pnid2graph has exited, failing site start

    2024-10-16T03:39:43.254Z ERROR - Container pnid2graph_0_d22839d8 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.

    2024-10-16T03:39:43.353Z INFO - Stopping site pnid2graph because it failed during startup./home/LogFiles/AppServiceAppLogs_Feature_Installer/startup_1184.log (https://pnid2graph-chfcadefgpevbhc7.scm.eastus2-01.azurewebsites.net/api/vfs/LogFiles/AppServiceAppLogs_Feature_Installer/startup_1184.log)

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.