Install linux dependency during the python WebApp zip deployment (Azure, Oryx)

167 Views Asked by At

I would like to install linux package during the python Azure Web App (app services) deployment.

Type of the app is "code" and at the moment I cannot use docker container deployment due to non-technical restrictions.

however application requires linux library to be installed. I am searching for the alternatives on how to deliver it without using container solutions.

One of the articles suggested to check ORYX deployment, but I cannot find any good details or demo where package dll is installed when code is deployed using zip package.

I would appreciate any suggestion.

1

There are 1 best solutions below

1
SiddheshDesai On

Refer this blog to install Python native/local dependencies in your Azure Web app, I have added this Github repository mentioned in the blog in my Azure Web app and added the folder path to requirements.txt the packages from those folders- Folder 1- ./NmspcPing , Folder 2- ./NmspcPong got installed successfully in the Azure Web App.

My Folder Structure:-

enter image description here

My requirements.txt:-

Django
whitenoise
./NmspcPing
./NmspcPong

Output:-

During Azure Web App deployment the local packages from ./NmspcPing and ./NmspcPong got deployed successfully:-

enter image description here

Using setup.py is also one way of installing the Linux libraries directly by SSH'ing into Azure Web App.

I have visited Azure Web App > Development Tools > Advanced Tools > Go > kudu site > SSH > run the command below:-

python setup.py install

Output:-

enter image description here

Azure Web app loads successfully:-

enter image description here