Skip to content

Commit 3e62851

Browse files
authored
Update computer-vision-how-to-install-containers.md
1 parent 816f2b4 commit 3e62851

File tree

1 file changed

+5
-154
lines changed

1 file changed

+5
-154
lines changed

articles/cognitive-services/Computer-vision/computer-vision-how-to-install-containers.md

Lines changed: 5 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Use the [`docker pull`](https://docs.docker.com/engine/reference/commandline/pul
9494

9595
### Docker pull for the Read OCR container
9696

97-
# [Version 3.2 model 2021-09-30-preview](#tab/version-3-2-model-2021-09-30-preview)
97+
For the latest preview:
9898

9999
```bash
100100
docker pull mcr.microsoft.com/azure-cognitive-services/vision/read:3.2-model-2021-09-30-preview
@@ -129,35 +129,10 @@ Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/)
129129

130130
[Examples](computer-vision-resource-container-config.md#example-docker-run-commands) of the `docker run` command are available.
131131

132-
# [Version 3.2 model 2021-09-30-preview](#tab/version-3-2-model-2021-09-30-preview)
132+
For the latest preview, replace 3.2 path with:
133133

134-
```bash
135-
docker pull mcr.microsoft.com/azure-cognitive-services/vision/read:3.2-model-2021-09-30-preview
136134
```
137-
138-
```bash
139-
docker run --rm -it -p 5000:5000 --memory 18g --cpus 8 \
140135
mcr.microsoft.com/azure-cognitive-services/vision/read:3.2-model-2021-09-30-preview \
141-
Eula=accept \
142-
Billing={ENDPOINT_URI} \
143-
ApiKey={API_KEY}
144-
```
145-
146-
This command:
147-
148-
* Runs the Read OCR container from the container image.
149-
* Allocates 8 CPU core and 18 gigabytes (GB) of memory.
150-
* Exposes TCP port 5000 and allocates a pseudo-TTY for the container.
151-
* Automatically removes the container after it exits. The container image is still available on the host computer.
152-
153-
You can alternatively run the container using environment variables:
154-
155-
```bash
156-
docker run --rm -it -p 5000:5000 --memory 18g --cpus 8 \
157-
--env Eula=accept \
158-
--env Billing={ENDPOINT_URI} \
159-
--env ApiKey={API_KEY} \
160-
mcr.microsoft.com/azure-cognitive-services/vision/read:3.2-model-2021-09-30-preview
161136
```
162137

163138
# [Version 3.2](#tab/version-3-2)
@@ -241,9 +216,9 @@ To find your connection string:
241216

242217
The container provides REST-based query prediction endpoint APIs.
243218

244-
# [Version 3.2 model 2021-09-30-preview](#tab/version-3-2-model-2021-09-30-preview)
219+
For the latest preview:
245220

246-
Use the host, `http://localhost:5000`, for container APIs. You can view the Swagger path at: `http://localhost:5000/swagger/vision-v3.2-read-model-2021-09-30-preview/swagger.json`.
221+
Use the same Swagger path as 3.2 but a different port if you have already deployed 3.2 at the 5000 port.
247222

248223
# [Version 3.2](#tab/version-3-2)
249224

@@ -257,131 +232,7 @@ Use the host, `http://localhost:5000`, for container APIs. You can view the Swag
257232

258233
### Asynchronous Read
259234

260-
# [Version 3.2 model 2021-09-30-preview](#tab/version-3-2-model-2021-09-30-preview)
261-
262-
You can use the `POST /vision/v3.2/read/analyze` and `GET /vision/v3.2/read/operations/{operationId}` operations in concert to asynchronously read an image, similar to how the Computer Vision service uses those corresponding REST operations. The asynchronous POST method will return an `operationId` that is used as the identifer to the HTTP GET request.
263-
264-
265-
From the swagger UI, select the `Analyze` to expand it in the browser. Then select **Try it out** > **Choose file**. In this example, we'll use the following image:
266-
267-
![tabs vs spaces](media/tabs-vs-spaces.png)
268-
269-
When the asynchronous POST has run successfully, it returns an **HTTP 202** status code. As part of the response, there is an `operation-location` header that holds the result endpoint for the request.
270-
271-
```http
272-
content-length: 0
273-
date: Fri, 04 Sep 2020 16:23:01 GMT
274-
operation-location: http://localhost:5000/vision/v3.2/read/operations/a527d445-8a74-4482-8cb3-c98a65ec7ef9
275-
server: Kestrel
276-
```
277-
278-
The `operation-location` is the fully qualified URL and is accessed via an HTTP GET. Here is the JSON response from executing the `operation-location` URL from the preceding image:
279-
280-
```json
281-
{
282-
"status": "succeeded",
283-
"createdDateTime": "2021-02-04T06:32:08.2752706+00:00",
284-
"lastUpdatedDateTime": "2021-02-04T06:32:08.7706172+00:00",
285-
"analyzeResult": {
286-
"version": "3.2.0",
287-
"readResults": [
288-
{
289-
"page": 1,
290-
"angle": 2.1243,
291-
"width": 502,
292-
"height": 252,
293-
"unit": "pixel",
294-
"lines": [
295-
{
296-
"boundingBox": [
297-
58,
298-
42,
299-
314,
300-
59,
301-
311,
302-
123,
303-
56,
304-
121
305-
],
306-
"text": "Tabs vs",
307-
"appearance": {
308-
"style": {
309-
"name": "handwriting",
310-
"confidence": 0.96
311-
}
312-
},
313-
"words": [
314-
{
315-
"boundingBox": [
316-
68,
317-
44,
318-
225,
319-
59,
320-
224,
321-
122,
322-
66,
323-
123
324-
],
325-
"text": "Tabs",
326-
"confidence": 0.933
327-
},
328-
{
329-
"boundingBox": [
330-
241,
331-
61,
332-
314,
333-
72,
334-
314,
335-
123,
336-
239,
337-
122
338-
],
339-
"text": "vs",
340-
"confidence": 0.977
341-
}
342-
]
343-
},
344-
{
345-
"boundingBox": [
346-
286,
347-
171,
348-
415,
349-
165,
350-
417,
351-
197,
352-
287,
353-
201
354-
],
355-
"text": "paces",
356-
"appearance": {
357-
"style": {
358-
"name": "handwriting",
359-
"confidence": 0.746
360-
}
361-
},
362-
"words": [
363-
{
364-
"boundingBox": [
365-
286,
366-
179,
367-
404,
368-
166,
369-
405,
370-
198,
371-
290,
372-
201
373-
],
374-
"text": "paces",
375-
"confidence": 0.938
376-
}
377-
]
378-
}
379-
]
380-
}
381-
]
382-
}
383-
}
384-
```
235+
For the latest preview, everything is the same as 3.2 except for the additional `"modelVersion": "2021-09-30-preview"`.
385236

386237
# [Version 3.2](#tab/version-3-2)
387238

0 commit comments

Comments
 (0)