document-intelligence
Azure AI Document Intelligence container for disconnected (offline) environments
About this chart
Azure AI Document Intelligence Helm Chart
Language: English | 简体中文 | 国内访问
This Helm chart deploys Azure AI Document Intelligence containers in disconnected (offline) environments on Kubernetes.
Overview
Azure AI Document Intelligence containers allow you to run Document Intelligence APIs locally with the benefits of containerization. Disconnected containers are designed for scenarios where no connectivity with Azure cloud is needed after initial setup.
Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
- Azure AI Document Intelligence resource with disconnected containers commitment tier
- Sufficient cluster resources (minimum 8 cores, 16GB memory per pod)
- Persistent storage provisioner (for license and logs)
Known Limitations
We sincerely apologize for a limitation in this chart regarding special character compatibility.
Due to Kubernetes environment variable naming restrictions and the configuration approach used in this chart, there are known limitations when working with certain special characters in environment variable separators:
- Colon (
:) is NOT supported as a configurable separator - this is a Kubernetes-enforced limitation that we cannot work around in the current implementation - The chart uses double underscore (
__) as the default separator for maximum compatibility - While dot (
.), hyphen (-), and single underscore (_) are technically supported, they may cause issues in certain Kubernetes versions or environments
We understand this limitation may cause inconvenience when migrating from configurations that use colon separators. We are working on improving this in future versions to provide better flexibility while maintaining Kubernetes compatibility. If you have specific use cases that require alternative separator characters, please open an issue so we can understand your needs better.
For detailed configuration options and workarounds, please see the Environment Variable Separator Configuration section below.
Supported Models
This chart supports the following Document Intelligence models:
| Model | Image Repository | Minimum Memory | Recommended Memory |
|---|---|---|---|
| Read | form-recognizer/read-4.0 | 8GB | 16GB |
| Layout | form-recognizer/layout-3.0 | 16GB | 24GB |
| Invoice | form-recognizer/invoice-3.0 | 16GB | 24GB |
| Receipt | form-recognizer/receipt-3.0 | 11GB | 24GB |
| Business Card | form-recognizer/businesscard-3.0 | 16GB | 24GB |
| ID Document | form-recognizer/idDocument-3.0 | 8GB | 24GB |
| General Document | form-recognizer/generaldocument-3.0 | 12GB | 24GB |
| Custom Template | form-recognizer/custom-template-3.0 | 16GB | 24GB |
Installation
Quick Start with all-in-one.yaml
For quick deployment without Helm, you can use the pre-rendered all-in-one.yaml manifest:
# Deploy directly with kubectl
kubectl apply -f https://raw.githubusercontent.com/Hoverhuang-er/charts/main/Microsoft/azure-ai-services/charts/document-intelligence/all-in-one.yaml
Note: The all-in-one.yaml uses default configurations. For production deployments or custom configurations, use Helm installation methods below.
Step 1: Request Access
Before using disconnected containers:
- Submit a request form for access
- Purchase a commitment plan in Azure Portal
- Create an Azure AI Document Intelligence resource with "Commitment tier disconnected containers DC0" pricing tier
Step 2: Initial Setup (License Download)
First, deploy the chart with license download enabled to obtain the license file:
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.azure.billingEndpoint="https://your-resource.cognitiveservices.azure.com" \
--set documentIntelligence.azure.apiKey="your-api-key" \
--set documentIntelligence.azure.downloadLicense=true
Wait for the pod to complete license download (check logs):
kubectl logs -f deployment/document-intelligence
Step 3: Switch to Disconnected Mode
After license is downloaded, upgrade to disconnected mode:
helm upgrade document-intelligence ./document-intelligence \
--set documentIntelligence.azure.downloadLicense=false
Alternative: Use Pre-downloaded License
If you already have a downloaded license.dat file, you can provide it directly:
# Encode the license file
LICENSE_DATA=$(base64 < license.dat)
# Deploy with the license data (no download needed)
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.license.licenseData="$LICENSE_DATA"
This creates a Kubernetes Secret with the license file, eliminating the need for:
- Initial license download step
- License PVC (saves storage costs)
- Azure credentials in production
See LICENSE-FILE-USAGE.md for detailed instructions and additional methods.
Configuration
Key Parameters
| Parameter | Description | Default |
|---|---|---|
kubernetesVersion | Kubernetes version (1.32, 1.28, 1.26, 1.24, pre-1.24) | 1.32 |
image.repository | Container image repository | mcr.microsoft.com/azure-cognitive-services/form-recognizer/read-4.0 |
image.tag | Container image tag | latest |
documentIntelligence.modelType | Model type (read, layout, invoice, etc.) | read |
documentIntelligence.envSeparator | Separator for mount env vars (__, _, ., -) | __ |
documentIntelligence.azure.billingEndpoint | Azure billing endpoint (for license download) | "" |
documentIntelligence.azure.apiKey | Azure API key (for license download) | "" |
documentIntelligence.azure.downloadLicense | Enable license download mode | false |
documentIntelligence.license.mountPath | License storage path | /license |
documentIntelligence.license.storageSize | License PVC size | 1Gi |
documentIntelligence.output.mountPath | Usage logs storage path | /logs |
documentIntelligence.output.storageSize | Output PVC size | 5Gi |
ingress.enabled | Enable ingress | true |
ingress.controllerType | Ingress controller (azure-loadbalancer, application-gateway, nginx) | azure-loadbalancer |
resources.requests.memory | Memory request | 16Gi |
resources.requests.cpu | CPU request | 8 |
resources.limits.memory | Memory limit | 24Gi |
resources.limits.cpu | CPU limit | 8 |
service.type | Kubernetes service type | ClusterIP |
service.port | Service port | 5000 |
Advanced Configuration Parameters
| Parameter | Description | Default | Range |
|---|---|---|---|
documentIntelligence.advanced.storageTimeToLiveInMinutes | TTL for intermediate/final files | 2880 (2 days) | 5-10080 min |
documentIntelligence.advanced.taskMaxRunningTimeSpanInMinutes | Request timeout threshold | 60 | 1+ min |
documentIntelligence.advanced.healthCheckMemoryUpperboundInMB | Memory health check threshold | auto | MB |
documentIntelligence.advanced.queueAzureConnectionString | Azure Queue connection (custom template) | "" | - |
documentIntelligence.advanced.storageObjectStoreAzureBlobConnectionString | Azure Blob connection (custom template) | "" | - |
documentIntelligence.advanced.httpProxyBypassUrls | Proxy bypass URLs | "" | CSV |
documentIntelligence.advanced.performance.oneOcrConcurrency | OneOCR parallel operations | "" (auto) | 4-16 |
documentIntelligence.advanced.performance.ocrWorkerThreadPoolSize | OCR worker threads | "" (auto) | 2-8 |
documentIntelligence.advanced.performance.queuePriorityExtraConcurrentWorkerCount | Priority queue workers | "" (auto) | 0-4 |
documentIntelligence.advanced.logging.consoleLogLevel | Console log level | Information | See below |
Log Levels: Trace, Debug, Information, Warning, Error, Critical, None
Performance Tuning: The performance parameters (oneOcrConcurrency, ocrWorkerThreadPoolSize, queuePriorityExtraConcurrentWorkerCount) are disabled by default for optimal resource usage. Enable them for high-volume scenarios. See values-advanced-example.yaml for recommended settings.
Example: Deploy Invoice Model
helm install invoice-analyzer ./document-intelligence \
--set image.repository="mcr.microsoft.com/azure-cognitive-services/form-recognizer/invoice-3.0" \
--set documentIntelligence.modelType=invoice \
--set documentIntelligence.azure.billingEndpoint="https://your-resource.cognitiveservices.azure.com" \
--set documentIntelligence.azure.apiKey="your-api-key" \
--set documentIntelligence.azure.downloadLicense=true
Kubernetes Version Compatibility
This chart supports multiple Kubernetes versions. Set the kubernetesVersion parameter:
# For Kubernetes 1.32 (default)
helm install document-intelligence ./document-intelligence
# For Kubernetes 1.24
helm install document-intelligence ./document-intelligence \
--set kubernetesVersion="1.24"
# For Kubernetes versions before 1.24 (disables securityContext)
helm install document-intelligence ./document-intelligence \
--set kubernetesVersion="pre-1.24"
Note: Kubernetes versions before 1.24 will have securityContext disabled for compatibility.
Ingress Configuration
The chart creates an Ingress resource by default. Choose your ingress controller:
Azure Load Balancer (Default)
helm install document-intelligence ./document-intelligence \
--set ingress.controllerType="azure-loadbalancer" \
--set ingress.hosts[0].host="document-intelligence.example.com"
Azure Application Gateway Ingress Controller (AGIC)
helm install document-intelligence ./document-intelligence \
--set ingress.controllerType="application-gateway" \
--set ingress.hosts[0].host="document-intelligence.example.com"
NGINX Ingress Controller
helm install document-intelligence ./document-intelligence \
--set ingress.controllerType="nginx" \
--set ingress.hosts[0].host="document-intelligence.example.com"
Disable Ingress
helm install document-intelligence ./document-intelligence \
--set ingress.enabled=false
Environment Variable Separator Configuration
The chart allows you to customize the separator character used in mount-related environment variables (Mounts__License, Mounts__Output, Mounts__Shared). This is useful for compatibility with different Azure AI Services container versions.
Default: double underscore (__) - Recommended for Kubernetes compatibility
- Generates:
Mounts__License,Mounts__Output,Mounts__Shared
Available options: __ (double underscore, default), _ (single underscore), . (dot), - (hyphen)
⚠️ Important Notes:
- Colon (
:) is NOT supported for user-configurable separators due to Kubernetes restrictions - Some Azure container environment variables use colons (e.g.,
Task:MaxRunningTimeSpanInMinutes) - these are hardcoded in the deployment template with proper quoting - Dot (
.) may cause issues in older Kubernetes versions - Double underscore (
__) is the safest and recommended option
Using Single Underscore
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.envSeparator="_"
# Generates: Mounts_License, Mounts_Output, Mounts_Shared
# Note: May cause Helm rendering issues in some versions
Using Hyphen
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.envSeparator="-"
# Generates: Mounts-License, Mounts-Output, Mounts-Shared
Using Dot
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.envSeparator="."
# Generates: Mounts.License, Mounts.Output, Mounts.Shared
In values.yaml
documentIntelligence:
envSeparator: "__" # Default: double underscore (recommended)
# Other options: "_", ".", "-"
# Note: Colon ":" is NOT supported
Using Existing PVCs
If you have existing PersistentVolumeClaims for license or logs:
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.license.existingClaim="my-license-pvc" \
--set documentIntelligence.output.existingClaim="my-output-pvc"
Advanced Configuration Examples
Configure Storage TTL and Task Timeout
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.advanced.storageTimeToLiveInMinutes=1440 \
--set documentIntelligence.advanced.taskMaxRunningTimeSpanInMinutes=120 \
--set documentIntelligence.advanced.logging.consoleLogLevel="Debug"
Configure Performance Tuning for High-Volume Scenarios
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.advanced.performance.oneOcrConcurrency=8 \
--set documentIntelligence.advanced.performance.ocrWorkerThreadPoolSize=3 \
--set documentIntelligence.advanced.performance.queuePriorityExtraConcurrentWorkerCount=1
Note: Performance tuning increases resource usage. Ensure sufficient CPU and memory are allocated.
Configure with Azure Queue and Blob Storage (Custom Template)
helm install document-intelligence ./document-intelligence \
--set documentIntelligence.modelType=customTemplate \
--set documentIntelligence.advanced.queueAzureConnectionString="DefaultEndpointsProtocol=https;..." \
--set documentIntelligence.advanced.storageObjectStoreAzureBlobConnectionString="DefaultEndpointsProtocol=https;..."
Use Advanced Configuration File
See values-advanced-example.yaml for a complete example with all advanced parameters.
helm install document-
Deploy document-intelligence with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has document-intelligence on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdocument-intelligence is pinned at v0.2.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply