I have a Python web app that I ZIP-deploy, and for some reason it keeps creating and removing a virtual environment in a loop, never finishing.
2020-05-19T23:25:53.967623000Z Found virtual environment .tar.gz archive.
2020-05-19T23:25:53.968226705Z Removing existing virtual environment directory /antenv...
2020-05-19T23:25:53.976257370Z Extracting to directory /antenv...
2020-05-19T23:25:56.205290595Z Using packages from virtual environment antenv located at /antenv.
2020-05-19T23:25:56.206097405Z Updated PYTHONPATH to ':/antenv/lib/python3.7/site-packages'
2020-05-19T23:25:56.216082621Z Found virtual environment .tar.gz archive.
2020-05-19T23:25:56.216518226Z Removing existing virtual environment directory /antenv...
2020-05-19T23:25:56.331714066Z Extracting to directory /antenv...
2020-05-19T23:25:57.226820579Z Using packages from virtual environment antenv located at /antenv.
2020-05-19T23:25:57.227425286Z Updated PYTHONPATH to ':/antenv/lib/python3.7/site-packages:/antenv/lib/python3.7/site-packages'
I use this command to deploy:
az webapp deployment source config-zip --src app.zip
My requirements.txt contains this:
I have a wheel hcem-0.1.dev359+g350d752.d20200520-py3-none-any.whl in the ZIP file.
My startup.sh contains this:
python -m uvicorn application:app --host 0.0.0.0
I'm using SCM_DO_BUILD_DURING_DEPLOYMENT = true
I tried in the app settings to put startup.sh or passing the start command directly.
This seems related: https://github.com/microsoft/Oryx/issues/557 and also this one https://github.com/Azure-App-Service/python/issues/17 but I couldn't figure out my issue with either one.
What is the "Found virtual environment .tar.gz archive." message about? Which file exactly?
Any suggestion to debug or fix this deployment issue?