Skip to content

A python based computer vision model hosted in Azure Functions.

Notifications You must be signed in to change notification settings

rndazurescript/python-ml-azure-function

Repository files navigation

Python Computer Vision Model in Azure Functions

A python based computer vision model hosted in Azure Functions.

The python codebase is created from the Make machine learning predictions with TensorFlow and Azure Functions.

  • 'app': Contains the python codebase
  • 'client': Sample app to invoke the local running azure function.
  • 'IaC': Contains ARM deployment template
  • 'azure-pipelines.yml': Package and release pipeline
  • 'Enable-LongPathSupport.ps1': Enables long path support on windows, as described in the reference article.

Deploy azure resources

Deploy to Azure

Run local

On a windows pc with conda installed:

cd __app__
conda create -n venv python=3.7
activate venv
pip install --no-cache-dir -r requirements.txt
func start

Use the following test urls:

Optionally start the client and use the same github urls.

Create Azure DevOps pipeline

Register an Azure DevOps pipeline using the azure-pipelines.yml in the root of this repo:

Register Azure DevOps pipeline

Specify the following variables:

  • azureSubscription: The Azure DevOps Resource Manager connection to use for deployment.
  • functionAppName: The Azure Function App to deploy the model to.
  • vmImageName: Use ubuntu-latest or windows-latest.

Azure DevOps variables

Test the model is running

In order to test if the model is working fine, install pytest

pip install pytest

and then navigate in the __app__ folder and run pytest:

cd __app__
pytest

About

A python based computer vision model hosted in Azure Functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published