@Todd Player thanks for your patience. It is possible to use GDAL with Azure App Service, but there are some limitations and considerations that you need to keep in mind.
-First, Azure App Service runs on a Linux-based environment, so you need to make sure that you are using the Linux version of GDAL. You can install GDAL on Linux using the package manager of your Linux distribution. For example, on Ubuntu, you can install GDAL using the following command**:**
sudo apt-get install gdal-bin
-Second, you need to make sure that the GDAL libraries are in the search path of your Python application. You can do this by setting the LD_LIBRARY_PATH
environment variable to include the directory where the GDAL libraries are installed. For example, if you installed GDAL using the command above, you can set the LD_LIBRARY_PATH
environment variable as follows:
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
You can set this environment variable in your Azure App Service by adding an application setting with the name LD_LIBRARY_PATH
and the value /usr/lib/x86_64-linux-gnu/
.
-Finally, you need to make sure that your Python application is using the correct version of GDAL. You can do this by installing the GDAL
Python package using pip
. For example, you can install the GDAL
package using the following command
pip install GDAL==<version>
Make sure to replace <version>
with the version of GDAL that you installed on your Linux environment.
If you have followed these steps and are still experiencing issues, you can try enabling the detailed error logging in Azure App Service to get more information about the error. You can do this by setting the WEBSITE_WEBDEPLOY_USE_SCM
application setting to true
and then accessing the Kudu console for your app service. From the Kudu console, you can view the detailed error logs and troubleshoot the issue further.
-Grace