You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/language-service/conversational-language-understanding/how-to/use-containers.md
+43-43Lines changed: 43 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,12 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
24
24
25
25
## Prerequisites
26
26
27
-
You must meet the following prerequisites before using CLU containers.
27
+
You must meet the following prerequisites before using CLU containers.
28
28
29
29
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/cognitive-services/).
30
-
*[Docker](https://docs.docker.com/) installed on a host computer. Docker must be configured to allow the containers to connect with and send billing data to Azure.
30
+
*[Docker](https://docs.docker.com/) installed on a host computer. Docker must be configured to allow the containers to connect with and send billing data to Azure.
31
31
* On Windows, Docker must also be configured to support Linux containers.
32
-
* You should have a basic understanding of [Docker concepts](https://docs.docker.com/get-started/overview/).
32
+
* You should have a basic understanding of [Docker concepts](https://docs.docker.com/get-started/overview/).
33
33
* A <ahref="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics"title="Create a Language resource"target="_blank">Language resource </a>
CPU core and memory correspond to the `--cpus` and `--memory` settings, which are used as part of the `docker run` command.
50
50
51
-
## Export your Conversational Language Understanding model
51
+
## Export your Conversational Language Understanding model
52
52
53
-
Before you proceed with running the docker image, you need to export your own trained model to expose it to your container. Use the following command to extract your model and replace the placeholders below with your own values:
53
+
Before you proceed with running the docker image, you need to export your own trained model to expose it to your container. Use the following command to extract your model and replace the placeholders below with your own values:
54
54
55
55
|Placeholder |Value|Format or example|
56
56
|------------|-----|-----------------|
57
57
|**{API_KEY}**|The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal.|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
58
58
|**{ENDPOINT_URI}**|The endpoint for accessing the Conversational Language Understanding API. You can find it on your resource's **Key and endpoint** page, on the Azure portal.|`https://<your-custom-subdomain>.cognitiveservices.azure.com`|
59
59
|**{PROJECT_NAME}**|The name of the project containing the model that you want to export. You can find it on your projects tab in the Language Studio portal.|myProject|
60
-
|**{TRAINED_MODEL_NAME}** |The name of the trained model you want to export. You can find your trained models on your model evaluation tab under your project in the Language Studio portal|myTrainedModel
60
+
|**{TRAINED_MODEL_NAME}** |The name of the trained model you want to export. You can find your trained models on your model evaluation tab under your project in the Language Studio portal|myTrainedModel
61
61
|**{EXPORTED_MODEL_NAME}**|The name to assign for the new exported model created.|myExportedModel |
62
62
63
63
```bash
64
-
curl --location --request PUT '{ENDPOINT_URI}/language/authoring/analyze-conversations/projects/{PROJECT_NAME}/exported-models/{EXPORTED_MODEL_NAME}?api-version=2024-11-15-preview'\
65
-
--header 'Ocp-Apim-Subscription-Key: {API_KEY}'\
66
-
--header 'Content-Type: application/json'\
67
-
--data-raw '{
68
-
"TrainedModelLabel": "{TRAINED_MODEL_NAME}"
69
-
}'
64
+
curl --location --request PUT '{ENDPOINT_URI}/language/authoring/analyze-conversations/projects/{PROJECT_NAME}/exported-models/{EXPORTED_MODEL_NAME}?api-version=2024-11-15-preview' \
65
+
--header 'Ocp-Apim-Subscription-Key: {API_KEY}' \
66
+
--header 'Content-Type: application/json' \
67
+
--data-raw '{
68
+
"TrainedModelLabel": "{TRAINED_MODEL_NAME}"
69
+
}'
70
70
```
71
71
72
72
## Get the container image with `docker pull`
@@ -75,50 +75,50 @@ The CLU container image can be found on the `mcr.microsoft.com` container regist
75
75
76
76
To use the latest version of the container, you can use the `latest` tag, which is for English. You can also find a full list of containers for supported languages using the [tags on the MCR](https://mcr.microsoft.com/product/azure-cognitive-services/language/clu/tags).
77
77
78
-
The latest CLU container is available in several languages. To download the container for the English container, use the command below.
78
+
The latest CLU container is available in several languages. To download the container for the English container, use the command below.
[!INCLUDE [Tip for using docker list](../../../includes/cognitive-services-containers-docker-list-tip.md)]
85
85
86
-
## Run the container in download model mode
86
+
## Run the container in download model mode
87
87
88
-
After creating the exported model in the section above, users have to run the container in order to download the deployment package that was created specifically for their exported models.
88
+
After creating the exported model in the section above, users have to run the container in order to download the deployment package that was created specifically for their exported models.
| **{API_KEY}**| The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
93
-
|**{ENDPOINT_URI}**| The endpoint for accessing the API. You can find it on your resource's **Key and endpoint** page, on the Azure portal.|`https://<your-custom-subdomain>.cognitiveservices.azure.com`|
94
-
|**{IMAGE_TAG}**| The image tag representing the language of the container you want to run. Make sure this matches the `docker pull` command you used. | latest|
95
-
|**{LOCAL_CLU_PORT}**| Port number assigned for the container in local machine.| 5000|
96
-
|**{LOCAL_MODEL_DIRECTORY}**| Absolute directory in host machine where exported models are saved in. |`C:\usr\local\myDeploymentPackage`|
97
-
|**{PROJECT_NAME}**| Name of the project that the exported model belongs to | myProject|
98
-
|**{EXPORTED_MODEL_NAME}**| Exported model to be downloaded | myExportedModel|
90
+
| Placeholder| Value|Format or example |
91
+
|---|---|---|
92
+
| **{API_KEY}**| The key for your Language resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
93
+
|**{ENDPOINT_URI}**| The endpoint for accessing the API. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |`https://<your-custom-subdomain>.cognitiveservices.azure.com`|
94
+
|**{IMAGE_TAG}**| The image tag representing the language of the container you want to run. Make sure this matches the `docker pull` command you used. | latest|
95
+
|**{LOCAL_CLU_PORT}**| Port number assigned for the container in local machine.| 5000 |
96
+
|**{LOCAL_MODEL_DIRECTORY}**| Absolute directory in host machine where exported models are saved in. |`C:\usr\local\myDeploymentPackage`|
97
+
|**{PROJECT_NAME}**| Name of the project that the exported model belongs to | myProject |
98
+
|**{EXPORTED_MODEL_NAME}**| Exported model to be downloaded | myExportedModel |
DO NOT alter the downloaded files. Even altering the name or folder structure can affect the integrity of the container and might break it.
111
+
DO NOT alter the downloaded files. Even altering the name or folder structure can affect the integrity of the container and might break it.
112
112
113
-
Repeat those steps to download as many models as you'd like to test. They can belong to different projects and have different exported model names.
113
+
Repeat those steps to download as many models as you'd like to test. They can belong to different projects and have different exported model names.
114
114
115
115
## Run the container with `docker run`
116
116
117
117
Once the container is on the host computer, use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the containers. The container continues to run until you stop it. Replace the placeholders below with your own values:
118
118
119
119
120
120
> [!IMPORTANT]
121
-
> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements.
121
+
> * The docker commands in the following sections use the back slash, `\`, as a line continuation character. Replace or remove this based on your host operating system's requirements.
122
122
> * The `Eula`, `Billing`, and `ApiKey` options must be specified to run the container; otherwise, the container won't start. For more information, see [Billing](#billing).
123
123
124
124
To run the CLU container, execute the following `docker run` command. Replace the placeholders below with your own values:
@@ -150,12 +150,12 @@ This command:
150
150
151
151
[!INCLUDE [Running multiple containers on the same host](../../../includes/cognitive-services-containers-run-multiple-same-host.md)]
152
152
153
-
## Running NER Container
154
-
CLU relies on NER to handle prebuilt entities. The CLU container works properly without NER if users decide not to integrate it. NER billing is disabled when it’s used through CLU, no extra charges are generated unless a call is made directly to NER’s container.
155
-
156
-
To set up NER in CLU container
157
-
- Follow the [NER container documentation](../../named-entity-recognition/how-to/use-containers.md).
158
-
- When running CLU container, make sure to set the parameter `Ner_Url `so that `Ner_Url=http://host.docker.internal:{LOCAL_NER_PORT}`
153
+
## Running NER Container
154
+
CLU relies on NER to handle prebuilt entities. The CLU container works properly without NER if users decide not to integrate it. NER billing is disabled when it's used through CLU, no extra charges are generated unless a call is made directly to NER's container.
155
+
156
+
To set up NER in CLU container
157
+
- Follow the [NER container documentation](../../named-entity-recognition/how-to/use-containers.md).
158
+
- When running CLU container, make sure to set the parameter `Ner_Url `so that `Ner_Url=http://host.docker.internal:{LOCAL_NER_PORT}`
0 commit comments