Skip to content

Commit aa21ec7

Browse files
authored
Merge pull request #2894 from aahill/foundry-docs-3
updating docker page
2 parents 397916c + 642f4fb commit aa21ec7

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

articles/ai-services/containers/docker-compose-recipe.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,20 @@ author: aahill
77
manager: nitinme
88
ms.service: azure-ai-services
99
ms.topic: how-to
10-
ms.date: 11/06/2024
10+
ms.date: 02/12/2025
1111
ms.author: aahi
1212

1313
# SME: Brendan Walsh
1414
#Customer intent: As a potential customer, I want to know how to configure containers so I can reuse them.
1515
---
1616

17-
# Use Docker Compose to deploy multiple containers
17+
# Use Docker Compose to deploy multiple Azure AI containers
1818

19-
This article shows you how to deploy multiple Azure AI containers. Specifically, you'll learn how to use Docker Compose to orchestrate multiple Docker container images.
19+
This article shows you how to deploy multiple Azure AI containers. Specifically, you'll learn how to use Docker Compose to orchestrate multiple Docker container images on a single host computer. The example in this article is deploying a [Document Intelligence](../document-intelligence/overview.md) container and a [AI Vision read](../computer-vision/how-to/call-read-api.md) container together.
2020

21+
> [!NOTE]
2122
> [Docker Compose](https://docs.docker.com/compose/) is a tool for defining and running multi-container Docker applications. In Compose, you use a YAML file to configure your application's services. Then, you create and start all the services from your configuration by running a single command.
2223
23-
It can be useful to orchestrate multiple container images on a single host computer. In this article, we'll pull together the Read and Document Intelligence containers.
24-
2524
## Prerequisites
2625

2726
This procedure requires several tools that must be installed and run locally:
@@ -36,13 +35,16 @@ This procedure requires several tools that must be installed and run locally:
3635

3736
## Docker Compose file
3837

39-
The YAML file defines all the services to be deployed. These services rely on either a `DockerFile` or an existing container image. In this case, we'll use two preview images. Copy and paste the following YAML file, and save it as *docker-compose.yaml*. Provide the appropriate **apikey**, **billing**, and **EndpointUri** values in the file.
38+
The YAML file defines all the Azure AI services containers to be deployed. These services rely on either a `DockerFile` or an existing container image. In this case, we'll use two images. Copy and paste the following YAML file, and save it as *docker-compose.yaml*. Provide the appropriate **apikey**, **billing**, and **EndpointUri** values in the file.
39+
40+
> [!IMPORTANT]
41+
> Be sure to create the directories on the host machine that are specified under the `volumes` node, or provide ones that exist on your machine. These directories must exist before you try to mount an image by using volume bindings.
4042
4143
```yaml
4244
version: '3.7'
4345
services:
4446
forms:
45-
image: "mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout"
47+
image: "mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout-3.1:latest"
4648
environment:
4749
eula: accept
4850
billing: # < Your Document Intelligence billing URL >
@@ -51,16 +53,16 @@ services:
5153
FormRecognizer__ComputerVisionEndpointUri: # < Your Document Intelligence URI >
5254
volumes:
5355
- type: bind
54-
source: E:\publicpreview\output
56+
source: E:\mydirectory\output
5557
target: /output
5658
- type: bind
57-
source: E:\publicpreview\input
59+
source: E:\mydirectory\input
5860
target: /input
5961
ports:
6062
- "5010:5000"
6163

6264
ocr:
63-
image: "mcr.microsoft.com/azure-cognitive-services/vision/read:3.1-preview"
65+
image: "mcr.microsoft.com/azure-cognitive-services/vision/read:latest"
6466
environment:
6567
eula: accept
6668
apikey: # < Your Azure AI Vision API key >
@@ -69,16 +71,10 @@ services:
6971
- "5021:5000"
7072
```
7173
72-
> [!IMPORTANT]
73-
> Create the directories on the host machine that are specified under the **volumes** node. This approach is required because the directories must exist before you try to mount an image by using volume bindings.
74-
7574
## Start the configured Docker Compose services
7675
7776
A Docker Compose file enables the management of all the stages in a defined service's life cycle: starting, stopping, and rebuilding services; viewing the service status; and log streaming. Open a command-line interface from the project directory (where the docker-compose.yaml file is located).
7877
79-
> [!NOTE]
80-
> To avoid errors, make sure that the host machine correctly shares drives with Docker Engine. For example, if *E:\publicpreview* is used as a directory in the *docker-compose.yaml* file, share drive **E** with Docker.
81-
8278
From the command-line interface, execute the following command to start (or restart) all the services defined in the *docker-compose.yaml* file:
8379
8480
```console
@@ -152,19 +148,19 @@ ocr_1 | Application started. Press Ctrl+C to shut down.
152148

153149
[!INCLUDE [Tip for using docker list](../includes/cognitive-services-containers-docker-list-tip.md)]
154150

155-
Here's some example output:
151+
Here's some example outputs:
156152

157153
```
158154
IMAGE ID REPOSITORY TAG
159-
2ce533f88e80 mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout latest
155+
2ce533f88e80 mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout-3.1 latest
160156
4be104c126c5 mcr.microsoft.com/azure-cognitive-services/vision/read:3.1-preview latest
161157
```
162158

163159
### Test containers
164160

165-
Open a browser on the host machine and go to **localhost** by using the specified port from the *docker-compose.yaml* file, such as http://localhost:5021/swagger/index.html. For example, you could use the **Try It** feature in the API to test the Document Intelligence endpoint. Both containers swagger pages should be available and testable.
161+
Open a browser on the host machine and go to **localhost** by using the specified port from the *docker-compose.yaml* file, such as `http://localhost:5021`. Both containers' landing pages should be available.
166162

167-
![Document Intelligence Container](media/form-recognizer-swagger-page.png)
163+
:::image type="content" source="../media/container-webpage.png" alt-text="A screenshot of the container landing page.":::
168164

169165
## Next steps
170166

Binary file not shown.

0 commit comments

Comments
 (0)