Skip to content

Commit f33e8ae

Browse files
committed
writer edits
1 parent 44186ac commit f33e8ae

File tree

3 files changed

+79
-82
lines changed

3 files changed

+79
-82
lines changed

articles/ai-services/content-safety/how-to/containers/image-container.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Analyze image container - Azure AI content safety
2+
title: Analyze image container - Azure AI Content Safety
33
titleSuffix: Azure AI services
44
description: Install and run content safety analyze image containers with Docker to detect harmful content in image.
55
author: PatrickFarley
@@ -13,30 +13,30 @@ keywords: on-premises, Docker, container
1313

1414
# Analyze image content with docker containers
1515

16-
The Analyze image container scans image for sexual content, violence, hate, and self harm with multi-severity levels. In this article, you learn how to download, install, and run a content safety to image container.
16+
The analyze image container scans images for sexual content, violence, hate, and self-harm with multi-severity levels. This guide shows how to download, install, and run a content safety image container.
1717

1818
For more information about prerequisites, validating that a container is running, running multiple containers on the same host, and running disconnected containers, see [Install and run content safety containers with Docker](./install-run-container.md).
1919

20-
## Container images
20+
## Specify a container image
2121

22-
The content safety analyze image container image for all supported versions can be found on the [Microsoft Container Registry (MCR)]( https://mcr.microsoft.com/en-us/product/azure-cognitive-services/contentsafety/image-analyze/tags) syndicate. It resides within the `azure-cognitive-services/contentsafety` repository and is named `image-analyze`.
22+
The content safety analyze image container image for all supported versions can be found on the [Microsoft Container Registry (MCR)](https://mcr.microsoft.com/product/azure-cognitive-services/contentsafety/image-analyze/tags) syndicate. It resides in the `azure-cognitive-services/contentsafety` repository and is named `image-analyze`.
2323

2424

25-
25+
<!--
2626
**to do: update MCR screenshot** **[to-do]** update MCR screenshot for AACS image analyze image. the MCR release is in progress, expect to finish by EOD 9/20 PST. the MCR link is https://mcr.microsoft.com/en-us/product/azure-cognitive-services/contentsafety/image-analyze/tags
27+
-->
2728

2829

29-
The fully qualified container image name is, `mcr.microsoft.com/en-us/product/azure-cognitive-services/contentsafety/image-analyze`. Either append a specific version or append `:latest` to get the most recent version.
30+
The fully qualified container name is, `mcr.microsoft.com/en-us/product/azure-cognitive-services/contentsafety/image-analyze`. Append a specific container version, or append `:latest` to get the most recent version. For example:
3031

3132
| Version | Path |
3233
|-----------|------------|
3334
| Latest | `mcr.microsoft.com/azure-cognitive-services/contentsafety/image-analyze:latest`<br/><br/>The `latest` tag pulls the latest image. |
34-
|1.0.0-amd64-preview|`mcr.microsoft.com/azure-cognitive-services/contentsafety/image-analyze:1.0.0-amd64-preview`|
35+
|`1.0.0-amd64-preview`|`mcr.microsoft.com/azure-cognitive-services/contentsafety/image-analyze:1.0.0-amd64-preview`|
3536

36-
## Get the container image with docker pull
37+
## Get the container image
3738

38-
You need the [prerequisites](./install-run-container.md#prerequisites) including required hardware. Also see the [recommended allocation of resources](./install-run-container.md#host-computer-requirements-and-recommendations)
39-
for each content safety container.
39+
Make sure you meet the [prerequisites](./install-run-container.md#prerequisites), including required hardware. Also see the [recommended allocation of resources](./install-run-container.md#host-computer-requirements-and-recommendations) section for each content safety container.
4040

4141
Use the [docker pull](https://docs.docker.com/engine/reference/commandline/pull/) command to download a container image from Microsoft Container Registry:
4242

@@ -45,7 +45,7 @@ docker mcr.microsoft.com/azure-cognitive-services/contentsafety/image-analyze:la
4545
```
4646

4747

48-
## Run the container with docker run
48+
## Run the container
4949

5050
Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the container.
5151

@@ -55,12 +55,12 @@ The following table represents the various `docker run` parameters and their cor
5555

5656
| Parameter | Description |
5757
|---------|---------|
58-
| `{ENDPOINT_URI}` | The endpoint is required for metering and billing. For more information, see [billing arguments](content safety-container-howto.md#billing-arguments). |
59-
| `{API_KEY}` | The API key is required. For more information, see [billing arguments](content safety-container-howto.md#billing-arguments). |
58+
| `{ENDPOINT_URI}` | The endpoint is required for metering and billing. For more information, see [billing arguments](./install-run-container.md#billing-arguments). |
59+
| `{API_KEY}` | The API key is required. For more information, see [billing arguments](./install-run-container.md#billing-arguments). |
6060

61-
When you run the content safety to image container, configure the port, memory, and CPU according to the content safety to image container [requirements and recommendations](content safety-container-howto.md#container-requirements-and-recommendations).
61+
When you run the content safety analyze image container, configure the port, memory, and CPU according to the [requirements and recommendations](./install-run-container.md#container-requirements-and-recommendations).
6262

63-
Here's an example `docker run` command with placeholder values. You must specify the `ENDPOINT_URI` and `API_KEY` values:
63+
Here's a sample `docker run` command with placeholder values. You must specify the `ENDPOINT_URI` and `API_KEY` values:
6464

6565
```bash
6666
docker run --rm -it -p 5000:5000 --gpus all \
@@ -72,17 +72,16 @@ ApiKey={API_KEY}
7272

7373
This command:
7474
* Runs an `image-analyze` container from the container image.
75-
* `--gpus all` Use all available GPU resources. Content safety container requires CUDA for optimal performance. See more in [host requirements and recommendations](./install-run-container.md#host-computer-requirements-and-recommendations). Also make sure your host install [NVIDIA container toolkit](./install-run-container.md#installing-the-nvidia-container-toolkit).
75+
* Uses all available GPU resources (by specifying `--gpus all`). Content safety containers require CUDA for optimal performance. Learn more in [host requirements and recommendations](./install-run-container.md#host-computer-requirements-and-recommendations). Also make sure your host installs [NVIDIA container toolkit](./install-run-container.md#installing-the-nvidia-container-toolkit).
7676
* Exposes TCP port 5000 and allocates a pseudo-TTY for the container.
7777
* Automatically removes the container after it exits. The container image is still available on the host computer.
7878

7979
# [Disconnected container](#tab/disconnected)
8080

81-
To run disconnected containers (not connected to the internet), you must submit [this request form](https://aka.ms/csdisconnectedcontainers) and wait for approval. For more information about applying and purchasing a commitment plan to use containers in disconnected environments, see [Use containers in disconnected environments](../../../containers/disconnected-containers.md) in the Azure AI services documentation.
81+
To run disconnected containers (not connected to the internet), you must submit a [request form](https://aka.ms/csdisconnectedcontainers) and wait for approval. For more information about applying and purchasing a commitment plan to use containers in disconnected environments, see [Use containers in disconnected environments](../../../containers/disconnected-containers.md) in the Azure AI services documentation.
8282

83-
If you're approved to run the container disconnected from the internet, the following example shows the formatting of the `docker run` command to use, with placeholder values. Replace these placeholder values with your own values.
83+
If you're approved to run the disconnected container, the following example shows the formatting of the `docker run` command to use, with placeholder values. Replace these values with your own values.
8484

85-
The `DownloadLicense=True` parameter in your `docker run` command downloads a license file to enable your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file is invalid to run the container. You can only use a license file with the appropriate container that you're approved for. For example, you can't use a license file for a `content safety-to-image` container with a `neural-image-to-content safety` container.
8685

8786
| Placeholder | Description |
8887
|-------------|-------|
@@ -103,7 +102,10 @@ DownloadLicense=True \
103102
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
104103
```
105104

106-
Once the license file is downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you use, with placeholder values. Replace these placeholder values with your own values.
105+
The `DownloadLicense=True` parameter in your `docker run` command downloads a license file to enable your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file is invalid to run the container. You can only use a license file with the appropriate container that you're approved for. For example, you can't use a license file for a `content safety-to-image` container with a `neural-image-to-content-safety` container.
106+
107+
108+
Once the license file is downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you use, with placeholder values. Replace these values with your own values.
107109

108110
Wherever the container is run, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. An output mount must also be specified so that billing usage records can be written.
109111

@@ -127,11 +129,11 @@ Mounts:License={CONTAINER_LICENSE_DIRECTORY}
127129
Mounts:Output={CONTAINER_OUTPUT_DIRECTORY}
128130
```
129131

130-
Content safety containers provide a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
132+
Content safety containers provide a default directory for writing the license file and billing log at runtime. The default directories are `/license` and `/output` respectively.
131133

132-
When you're mounting these directories to the container with the `docker run -v` command, make sure the local machine directory is set ownership to `user:group nonroot:nonroot` before running the container.
134+
When you're mounting these directories to the container with the `docker run -v` command, make sure the local machine directory has set ownership to `user:group nonroot:nonroot` before running the container.
133135

134-
Here's a sample command to set file/directory ownership.
136+
Here's a sample command to set file/directory ownership:
135137

136138
```bash
137139
sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PATH_2> ...
@@ -141,16 +143,13 @@ sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PA
141143

142144
## Test the container
143145

144-
Once the container is up and running, you can validate its operation by sending a request to the REST endpoint deployed within the container. To do this, follow below article. Note, you need to replace the endpoint URL with the Docker URL specific to your container deployment. Also, ensure that you're using host authentication, rather than key-based authentication.
145-
146-
[Analyze image quick start](../quickstart-image.md)
147-
148-
146+
Once the container is up and running, you can validate its operation by sending a request to the REST endpoint deployed within the container. To do this, follow the steps in the quickstart. Note, you need to replace the endpoint URL with the Docker URL specific to your container deployment. Also, ensure that you're using host authentication, rather than key-based authentication.
149147

148+
[Analyze image quickstart](../../quickstart-image.md)
150149

151150

152151
## Next steps
153152

154-
* See the [content safety containers overview](./container-overview.md)
153+
* See the [content safety containers overview](../../../container-overview.md)
155154
* Review [configure containers](./install-run-container.md) for configuration settings
156155
* Use more [Azure AI containers](../../../cognitive-services-container-support.md)

0 commit comments

Comments
 (0)