Skip to content

ownway22/azure-document-intelligence-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌀Azure Document Intelligence Custom Template 3.1 容器部署指南

本指南將說明如何下載、確認和啟動 Azure Cognitive Services Form Recognizer Custom Template 3.1 容器映像。

系統需求

部署步驟

步驟 1: 下載容器映像

從 Microsoft Container Registry 下載 Form Recognizer Custom Template 3.1 容器映像:

docker pull mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-template-3.1:latest

步驟 2: 確認下載成功

執行以下命令查看已下載的容器映像:

docker images

您應該會看到類似以下的輸出:

REPOSITORY                                                               TAG       IMAGE ID       CREATED        SIZE
mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-template-3.1   latest    xxxxxxxxx      x days ago     xxxGB

步驟 3: 啟動容器映像

使用以下命令啟動容器,配置所需的資源限制(8 核心,16GB 記憶體):

cd {C:\Users\...\azure-document-intelligence-docker}

powershell -Command "Get-Content .env | ForEach-Object { if ($_ -match '^\s*([^#][^=]*)=(.*)$') { $name = $matches[1].Trim(); $value = $matches[2].Trim(); [System.Environment]::SetEnvironmentVariable($name, $value, 'Process') } }"

docker run -dit --restart unless-stopped -it -p 5001:5000 --memory 16g --cpus 8 mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-template-3.1:latest Eula=accept Billing={your-endpoint} ApiKey={your-key}

或者

cd {C:\Users\...\azure-document-intelligence-docker}

powershell -Command "Get-Content .env | ForEach-Object { if ($_ -match '^\s*([^#][^=]*)=(.*)$') { $name = $matches[1].Trim(); $value = $matches[2].Trim(); [System.Environment]::SetEnvironmentVariable($name, $value, 'Process') } }"

docker-compose up

環境變數說明

  • EULA=accept: 接受最終用戶許可協議
  • Billing=<YOUR_ENDPOINT_URI>: 您的 Azure AI Document Intelligence Endpoint URL
  • ApiKey=<YOUR_API_KEY>: 您的 Azure AI Document Intelligence API Key

步驟 4: 驗證容器正常運行

容器啟動後,您可以透過以下 URL 確認服務是否正常運行:

http://localhost:5001/studio

疑難排解

如遇到問題,請參考以下文件以了解 Azure AI 容器傳回的狀態和錯誤:

Azure AI Containers FAQ - Status Messages and Errors

Reference

  1. Install and run Docker containers for Document Intelligence - Azure AI services | Microsoft Learn (04/04/2025 updated)

  2. Azure Document Intelligence Resource

  3. Install Docker Desktop on Windows

  4. Azure AI services Document Intelligence Custom Template 3.1

  5. Azure Document Intelligence Sample Dataset

  6. How to run the Azure AI Vision and Azure AI Document Intelligence engine On-Premise

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published