Skip to content

Commit 9f2eb02

Browse files
authored
Merge pull request #185330 from aahill/offline-containers
Speech-to-text & Translator params for disconnected containers
2 parents b2959e2 + f364d3b commit 9f2eb02

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

articles/cognitive-services/containers/disconnected-containers.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ docker pull mcr.microsoft.com/azure-cognitive-services/form-recognizer/invoice:l
8484
Now that you've downloaded your container, you will need to run the container with the `DownloadLicense=True` parameter in your `docker run` command. This parameter 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.
8585

8686
> [!IMPORTANT]
87-
> * When you run the container with `DownloadLicense=True`, your environment must be connected to the internet, and you must provide a valid key and endpoint. Once your container has been configured, it can be run disconnected from the internet, and without your key and endpoint.
8887
> * You can only use a license file with the appropriate container that you've been approved for. For example, you cannot use a license file for a speech-to-text container with a form recognizer container.
89-
> * If your container requires additional encrypted models, they should be downloaded by running the container with the `DownloadModel=True` flag.
88+
> * If you're using the [Translator container](../translator/containers/translator-how-to-install-container.md), using the example below will generate a docker `run` template that you can use to run the container, containing parameters you will need for the downloaded models and configuration file. Make sure you save this template.
9089
9190
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.
9291

@@ -111,12 +110,8 @@ After you have configured the container, use the next section to run the contain
111110

112111
## Run the container in a disconnected environment
113112

114-
> [!NOTE]
115-
> If you're using the [Translator container](../translator/containers/translator-how-to-install-container.md), you will need to add parameters for the downloaded translation models. For example:
116-
> ```bash
117-
> -e MODELS= /path/to/model1/, /path/to/model2/
118-
> -e TRANSLATORSYSTEMCONFIG=/path/to/model/config/translatorsystemconfig.json
119-
> ```
113+
> [!IMPORTANT]
114+
> If you're using the Translator or Speech-to-text containers, read the **Additional parameters** section below for information on commands or additional parameters you will need to use.
120115
121116
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.
122117

@@ -139,6 +134,27 @@ Mounts:License={LICENSE_MOUNT}
139134
Mounts:Output={OUTPUT_PATH}
140135
```
141136

137+
### Additional parameters and commands
138+
139+
See the following sections for additional parameters and commands you may need to run the container.
140+
141+
#### Translator container
142+
143+
If you're using the [Translator container](../translator/containers/translator-how-to-install-container.md), you will need to add parameters for the downloaded translation models and container configuration. These values are generated and displayed in the container output when you [configure the container](#configure-the-container-to-be-run-in-a-disconnected-environment) as described above. For example:
144+
```bash
145+
-e MODELS= /path/to/model1/, /path/to/model2/
146+
-e TRANSLATORSYSTEMCONFIG=/path/to/model/config/translatorsystemconfig.json
147+
```
148+
149+
#### Speech-to-text container
150+
151+
The [speech-to-text container](../speech-service/speech-container-howto.md?tabs=stt) provides two default directories, `license` and `output`, by default for writing the license file and billing log at runtime. 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.
152+
153+
Below is a sample command to set file/directory ownership.
154+
155+
```bash
156+
sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PATH_2> ...
157+
```
142158

143159
## Usage records
144160

0 commit comments

Comments
 (0)