azure-cognitive-servicesazure-form-recognizeron-premises-instances

Deploy Azure form recognizer Invoice in AKS on premise container


I have Invoice and Layout services docker images and there is a tutorial on how to deploy it using docker compose here

I would like to deploy the same(Invoice & Layout together) in AKS as on-premise. I've tried multiple ways but couldn't get it worked.

If anyone tried deploying above services in on-premise/disconnected environment using kubernetes then please do help me out.


Solution

  • The layout container hostname has to be same name as this "azure-container-service-layout" and try to deploy in AKS.

    In deployment file, make sure below environment variable is exactly same. if you change the hostname of layout container(i.e., IP of layout container/localhost/any other hostname) it doesn't forward the request to layout container and Invoice container endpoints will return the failed status since it is depends on layout service(Details here)

    AzureCognitiveServiceLayoutHost=http://azure-cognitive-service-layout:5000

    In deployment file under spec, you can explicitly give static hostname as "azure-cognitive-service-layout". After adding static hostname to the deployment, I'm able to deploy both containers(layout and invoice) together and get it worked as expected.

    spec:
      **hostname: azure-cognitive-service-layout**
      containers:
      - name: az-form-recognizer-invoice-deployment
        image: "mcr.microsoft.com/azure-cognitive-services/form-recognizer/invoice:latest"