azure-aksazure-form-recognizerazure-document-intelligence

Document Intelligence Custom Template AKS deployment


I am following this documentation to deploy a custom document intelligence container to AKS.

https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/containers/install-run?view=doc-intel-4.0.0&tabs=custom

I deployed the custom template image, layout image, and Nginx as the reverse proxy. I didn't deploy the document intelligence studio image as per the example as our team has already trained some models using Azure Document Intelligence Studio and wants to reuse those Model Id's.

But when I try to list the model using /form recognizer/documentModels, it does not list any custom models that we trained using Document Intelligence Studio outside the containerized environment. Both the document intelligence studio and custom container share the same subscription, endpoint, and keys.

What am I missing here? how do the containerized custom templates api's have access to the custom models we trained using studio?

Note that in the logs I can see some errors like

formrecognizercustomsupervised[0]
      SubscriptionId could not be found.

My custom template yaml:

   spec:
      serviceAccountName: azurekeyvaultsecretsprovider
      containers:
        - name: azure-cognitive-service-custom-template
          image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-template-3.0:latest
          volumeMounts:
            - name: di-secrets
              mountPath: "/mnt/secrets-store"
              readOnly: true
            - name: shared
              mountPath: /share           
            - name: output
              mountPath: /logs
          ports:
            - containerPort: 5000
              protocol: TCP
          env:
            - name: AzureCognitiveServiceLayoutHost
              value: http://layout:5000
            - name: Logging__Console__LogLevel__Default
              value: Debug
            - name: Mounts__Output
              value: /logs
            - name: Mounts__Shared
              value: /share
            - name: SharedRootFolder
              value: /share
            - name: ASPNETCORE_ENVIRONMENT
              value: Development
            - name: EULA
              value: accept
            - name: BILLING
              valueFrom:
                secretKeyRef:
                  name: docintelsecrets
                  key: billingendpoint
            - name: APIKEY
              valueFrom:
                secretKeyRef:
                  name: docintelsecrets
                  key: apikey1

Solution

  • We worked with the Microsoft support team to get some insights on this. We concluded that there is no way to access or move custom models that are trained outside the container environment inside the container environment.