I am following this documentation to deploy a custom document intelligence container to AKS.
.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/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
I am following this documentation to deploy a custom document intelligence container to AKS.
https://learn.microsoft/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/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
Share
Improve this question
edited Feb 14 at 19:41
ssilas777
asked Feb 4 at 23:01
ssilas777ssilas777
9,7644 gold badges46 silver badges69 bronze badges
9
|
Show 4 more comments
1 Answer
Reset to default 0To use custom models trained in Azure Document Intelligence Studio with the containerized environment:
Export the Model: Export the model from Azure Document Intelligence Studio as a .z file.
Load the Model into the Container: Mount the .z file into the container and configure it to use the model:
docker run -d \
-p 5000:5000 \
-v /path/to/models:/app/models \
-e MODEL_ID=your-model-id \
-e MODEL_PATH=/app/models/your-model-file.z \
your-container-image
Verify:
Query /formrecognizer/documentModels to confirm the model is listed.
The container operates offline and won’t automatically sync with Azure Studio models. Export and load the models manually. Might work its how i use it.
envFrom: - configMapRef: name: my-config - secretRef: name: my-secrets
– Sampath Commented Feb 5 at 12:53