Skip to content

Commit 905bb62

Browse files
committed
tabs for disconnected container
1 parent ad67d6b commit 905bb62

File tree

6 files changed

+260
-253
lines changed

6 files changed

+260
-253
lines changed

articles/cognitive-services/Speech-Service/speech-container-cstt.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ Obtain the **Model ID** to use as the argument to the `ModelId` parameter of the
9191

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

94+
# [Container run](#tab/container)
95+
9496
The following table represents the various `docker run` parameters and their corresponding descriptions:
9597

9698
| Parameter | Description |
@@ -209,6 +211,78 @@ ApiKey={API_KEY}
209211
> [!NOTE]
210212
> If you set more than one query or download parameter, the command will prioritize in this order: `BaseModelLocale`, model ID, and then `DisplayLocale` (only applicable for display models).
211213
214+
# [Disconnected container run](#tab/disconnected)
215+
216+
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#request-access-to-use-containers-in-disconnected-environments).
217+
218+
If you have been 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.
219+
220+
In order to prepare and configure the Custom Speech-to-Text container you will need two separate speech resources:
221+
222+
1. A regular Azure Speech Service resource which is either configured to use a "**S0 - Standard**" pricing tier or a "**Speech to Text (Custom)**" commitment tier pricing plan. This will be used to train, download, and configure your custom speech models for use in your container.
223+
1. An Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan. This is used to download your disconnected container license file required to run the container in disconnected mode.
224+
225+
Download the docker container and run it to get the required speech model as [described above](#get-the-container-image-with-docker-pull) using the regular Azure Speech resource. Next, you will need to download your disconnected license file.
226+
227+
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will 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 will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a speech-to-text container with a form recognizer container.
228+
229+
| Placeholder | Description |
230+
|-------------|-------|
231+
| `{IMAGE}` | The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text` |
232+
| `{LICENSE_MOUNT}` | The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory` |
233+
| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com` |
234+
| `{API_KEY}` | The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
235+
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
236+
237+
```bash
238+
docker run --rm -it -p 5000:5000 \
239+
-v {LICENSE_MOUNT} \
240+
{IMAGE} \
241+
eula=accept \
242+
billing={ENDPOINT_URI} \
243+
apikey={API_KEY} \
244+
DownloadLicense=True \
245+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
246+
```
247+
248+
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
249+
250+
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.
251+
252+
Placeholder | Value | Format or example |
253+
|-------------|-------|---|
254+
| `{IMAGE}` | The container image you want to use. | `mcr.microsoft.com/azure-cognitive-services/form-recognizer/invoice` |
255+
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container. | `4g` |
256+
| `{NUMBER_CPUS}` | The appropriate number of CPUs to allocate for your container. | `4` |
257+
| `{LICENSE_MOUNT}` | The path where the license will be located and mounted. | `/host/license:/path/to/license/directory` |
258+
| `{OUTPUT_PATH}` | The output path for logging [usage records](../containers/disconnected-containers.md#usage-records). | `/host/output:/path/to/output/directory` |
259+
| `{MODEL_PATH}` | The path where the model is located. | `/path/to/model/` |
260+
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem. | `/path/to/license/directory` |
261+
| `{CONTAINER_OUTPUT_DIRECTORY}` | Location of the output folder on the container's local filesystem. | `/path/to/output/directory` |
262+
263+
```bash
264+
docker run --rm -it -p 5000:5000 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \
265+
-v {LICENSE_MOUNT} \
266+
-v {OUTPUT_PATH} \
267+
-v {MODEL_PATH} \
268+
{IMAGE} \
269+
eula=accept \
270+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
271+
Mounts:Output={CONTAINER_OUTPUT_DIRECTORY}
272+
```
273+
274+
The [Custom Speech-to-Text](../speech-service/speech-container-howto.md?tabs=cstt) container provides a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
275+
276+
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.
277+
278+
Below is a sample command to set file/directory ownership.
279+
280+
```bash
281+
sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PATH_2> ...
282+
```
283+
284+
---
285+
212286
#### Custom pronunciation on the custom speech-to-text container
213287

214288
You can get custom pronunciation results in the output. All you need to do is have your own custom pronunciation rules set up in your custom model and mount the model to a custom-speech-to-text container.

articles/cognitive-services/Speech-Service/speech-container-howto.md

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -201,62 +201,6 @@ The container will test for network connectivity to the billing endpoint.
201201

202202
Tu 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#request-access-to-use-containers-in-disconnected-environments).
203203

204-
If you have been 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.
205-
206-
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will 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 will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a `speech-to-text` container with a `neural-text-to-speech` container.
207-
208-
| Placeholder | Description |
209-
|-------------|-------|
210-
| `{IMAGE}` | The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text` |
211-
| `{LICENSE_MOUNT}` | The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory` |
212-
| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com` |
213-
| `{API_KEY}` | The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
214-
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
215-
216-
```bash
217-
docker run --rm -it -p 5000:5000 \
218-
-v {LICENSE_MOUNT} \
219-
{IMAGE} \
220-
eula=accept \
221-
billing={ENDPOINT_URI} \
222-
apikey={API_KEY} \
223-
DownloadLicense=True \
224-
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
225-
```
226-
227-
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
228-
229-
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.
230-
231-
Placeholder | Value | Format or example |
232-
|-------------|-------|---|
233-
| `{IMAGE}` | The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text` |
234-
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container.<br/><br/>For example: `4g` |
235-
| `{NUMBER_CPUS}` | The appropriate number of CPUs to allocate for your container.<br/><br/>For example: `4` |
236-
| `{LICENSE_MOUNT}` | The path where the license will be located and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory` |
237-
| `{OUTPUT_PATH}` | The output path for logging [usage records](../containers/disconnected-containers.md#usage-records).<br/><br/>For example: `/host/output:/path/to/output/directory` |
238-
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
239-
| `{CONTAINER_OUTPUT_DIRECTORY}` | Location of the output folder on the container's local filesystem.<br/><br/>For example: `/path/to/output/directory` |
240-
241-
```bash
242-
docker run --rm -it -p 5000:5000 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \
243-
-v {LICENSE_MOUNT} \
244-
-v {OUTPUT_PATH} \
245-
{IMAGE} \
246-
eula=accept \
247-
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
248-
Mounts:Output={CONTAINER_OUTPUT_DIRECTORY}
249-
```
250-
251-
Speech containers provide a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
252-
253-
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.
254-
255-
Below is a sample command to set file/directory ownership.
256-
257-
```bash
258-
sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PATH_2> ...
259-
```
260204

261205
## Next steps
262206

articles/cognitive-services/Speech-Service/speech-container-lid.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ docker pull mcr.microsoft.com/azure-cognitive-services/speechservices/language-d
8080

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

83+
# [Container run](#tab/container)
84+
8385
The following table represents the various `docker run` parameters and their corresponding descriptions:
8486

8587
| Parameter | Description |
@@ -106,6 +108,70 @@ This command:
106108
* Exposes TCP port 5003 and allocates a pseudo-TTY for the container.
107109
* Automatically removes the container after it exits. The container image is still available on the host computer.
108110

111+
112+
# [Disconnected container run](#tab/disconnected)
113+
114+
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#request-access-to-use-containers-in-disconnected-environments).
115+
116+
If you have been 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.
117+
118+
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will 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 will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a `speech-to-text` container with a `neural-text-to-speech` container.
119+
120+
| Placeholder | Description |
121+
|-------------|-------|
122+
| `{IMAGE}` | The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text` |
123+
| `{LICENSE_MOUNT}` | The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory` |
124+
| `{ENDPOINT_URI}` | The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com` |
125+
| `{API_KEY}` | The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
126+
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
127+
128+
```bash
129+
docker run --rm -it -p 5000:5000 \
130+
-v {LICENSE_MOUNT} \
131+
{IMAGE} \
132+
eula=accept \
133+
billing={ENDPOINT_URI} \
134+
apikey={API_KEY} \
135+
DownloadLicense=True \
136+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
137+
```
138+
139+
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
140+
141+
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.
142+
143+
Placeholder | Value | Format or example |
144+
|-------------|-------|---|
145+
| `{IMAGE}` | The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text` |
146+
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container.<br/><br/>For example: `4g` |
147+
| `{NUMBER_CPUS}` | The appropriate number of CPUs to allocate for your container.<br/><br/>For example: `4` |
148+
| `{LICENSE_MOUNT}` | The path where the license will be located and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory` |
149+
| `{OUTPUT_PATH}` | The output path for logging [usage records](../containers/disconnected-containers.md#usage-records).<br/><br/>For example: `/host/output:/path/to/output/directory` |
150+
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
151+
| `{CONTAINER_OUTPUT_DIRECTORY}` | Location of the output folder on the container's local filesystem.<br/><br/>For example: `/path/to/output/directory` |
152+
153+
```bash
154+
docker run --rm -it -p 5003:5003 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \
155+
-v {LICENSE_MOUNT} \
156+
-v {OUTPUT_PATH} \
157+
{IMAGE} \
158+
eula=accept \
159+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
160+
Mounts:Output={CONTAINER_OUTPUT_DIRECTORY}
161+
```
162+
163+
Speech containers provide a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
164+
165+
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.
166+
167+
Below is a sample command to set file/directory ownership.
168+
169+
```bash
170+
sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PATH_2> ...
171+
```
172+
173+
---
174+
109175
For more information about `docker run` with Speech containers, see [Install and run Speech containers with Docker](speech-container-howto.md#run-the-container).
110176

111177
## Run with the speech-to-text container
@@ -118,7 +184,6 @@ docker run --rm -v ${HOME}:/root -ti antsu/on-prem-client:latest ./speech-to-tex
118184

119185
Increasing the number of concurrent calls can affect reliability and latency. For language identification, we recommend a maximum of four concurrent calls using 1 CPU with 1 GB of memory. For hosts with 2 CPUs and 2 GB of memory, we recommend a maximum of six concurrent calls.
120186

121-
122187
## Use the container
123188

124189

0 commit comments

Comments
 (0)