Skip to content

Commit 0c46a91

Browse files
committed
Fixes for deploy sampling tool.
1 parent 87f236a commit 0c46a91

File tree

6 files changed

+58
-19
lines changed

6 files changed

+58
-19
lines changed

articles/cognitive-services/form-recognizer/deploy-label-tool.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,80 @@ ms.author: pafarley
1515

1616
The Form Recognizer sample labeling tool is an application that provides a simple user interface (UI), which you can use to manually label forms (documents) for the purpose of supervised learning. In this article, we'll provide links and instructions that teach you how to:
1717

18-
* Run sample labeling tool locally
18+
* Run the sample labeling tool locally
1919
* Deploy the sample labeling tool to an Azure Container Instance (ACI)
20-
* Use the open sourced OCR Form Labeling Tool
20+
* Use and contribute to the open-source OCR Form Labeling Tool
2121

2222
## Run the sample labeling tool locally
2323

2424
The fastest way to start labeling data is to run the sample labeling tool locally. The following quickstart uses the Form Recognizer REST API and the sample labeling tool to train a custom model with manually labeled data.
2525

2626
* [Quickstart: Label forms, train a model, and analyze a form using the sample labeling tool](./quickstarts/label-tool.md).
2727

28-
## Deploy with Azure Container Instances
28+
## Deploy with Azure Container Instances (ACI)
2929

30-
Before we get started, it's important to note that there are two ways to deploy the sample labeling tool to an Azure Container Instance (AC):
30+
Before we get started, it's important to note that there are two ways to deploy the sample labeling tool to an Azure Container Instance (ACI). Both options are used to run the sample labeling tool with ACI:
3131

32-
* Using the Azure portal
33-
* Using the Azure CLI
32+
* [Using the Azure portal](#azure-portal)
33+
* [Using the Azure CLI](#azure-cli)
3434

3535
### Azure portal
3636

37-
You can run the label tool in a Docker web app container. First, [create a new Web App resource](https://ms.portal.azure.com/#create/Microsoft.WebSite) on the Azure portal. Fill in the form with your subscription and resource group details. Enter the following information in the required fields:
38-
* **Publish**: Docker Container
39-
* **Operating** System: Linux
37+
Follow these steps to create a new resource using the Azure portal:
4038

41-
On the next page, fill in the following fields for the Docker container setup:
39+
1. Sign in to the [Azure portal](https://portal.azure.com/signin/index/).
40+
2. Select **Create a resource**.
41+
3. Next, select **Web App**.
42+
![Select web app](./media/quickstarts/formre-create-web-app.png)
43+
4. First, make sure that the **Basics** tab is selected. Now, you're going to need to provide some information:
44+
![Select Basics](./media/quickstarts/formre-select-basics.png)
45+
* Subscription - Select an existing Azure subscription
46+
* Resource Group - You can reuse an existing resource group or create a new one for this project. Creating a new resource group is recommended.
47+
* Name - Give your web app a name.
48+
* Publish - Select **Docker Container**
49+
* Operating System - Select **Linux**
50+
* Region - Choose a region that makes sense for you.
51+
* Linux Plan - Select a pricing tier/plan for your app service.
4252

43-
* **Options**: Single Container
44-
* **Image Source**: Azure Container Registry
45-
* **Access Type**: public
46-
* **Image and tag**: mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest
53+
![Configure your web app](./media/quickstarts/formre-select-docker-linux.png)
4754

48-
The steps that follow are optional. Once your app has finished deploying, you can run it and access the label tool online.
55+
5. Next, select the **Docker** tab.
56+
57+
![Select Docker](./media/quickstarts/formre-select-docker.png)
58+
59+
6. Now let's configure your Docker container:
60+
* Options - Select **Single Container**
61+
* Image Source - Select **Private Registry**
62+
* Server URL - Set this to `https://mcr.microsoft.com`
63+
* Username - Create a username.
64+
* Password - Create a secure password that you'll remember.
65+
* Image and tag - Set this to `mcr.microsoft.com/azure-cognitive-services/custom-form/labeltool:latest`
66+
* Startup command - Set this to `./run.sh eula=accept`
67+
68+
![Configure Docker](./media/quickstarts/formre-configure-docker.png)
69+
70+
7. That's it. Next, select **Review + Create**, then **Create** to deploy your web app. When complete, you can access your web app at the URL provided in the **Overview** for your resource.
71+
72+
> [!NOTE]
73+
> When creating your web app, you can also configure authorization/authentication. This is not necessary to get started.
4974
5075
### Azure CLI
5176

52-
```cli
77+
As an alternative to using the Azure portal, you can create a resource using the Azure CLI.
78+
79+
> [!NOTE]
80+
> Before you continue, you'll need to install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest). You can skip this step if you're already working with the Azure CLI.
81+
82+
There's a few things you need know about this command:
83+
84+
* `DNS_NAME_LABEL=aci-demo-$RANDOM` generates a random DNS name.
85+
* This sample assumes that you have a resource group that you can use to create a resource. Replace `<resource_group_name>` with a valid resource group associated with your subscription.
86+
* You'll need to specify where you want to create the resource. Replace `<region name>` with your desired region for the web app.
87+
* Note: This command automatically accepts EULA.
88+
89+
From the Azure CLI, run this command to create a web app resource for the sample labeling tool:
90+
91+
```azurecli
5392
DNS_NAME_LABEL=aci-demo-$RANDOM
5493
5594
az container create \
@@ -66,12 +105,12 @@ az container create \
66105

67106
### Connect to Azure AD for authorization
68107

69-
We recommend to connect your web app to Azure Active Director (AAD) so that only someone with your credentials can sign in and use the app. Follow the instructions in [Configure your App Service app](https://docs.microsoft.com/azure/app-service/configure-authentication-provider-aad) to connect to AAD.
108+
It's recommended that you connect your web app to Azure Active Director (AAD). This ensures that only users with valid credentials can sign-in and use your web app. Follow the instructions in [Configure your App Service app](https://docs.microsoft.com/azure/app-service/configure-authentication-provider-aad) to connect to Azure Active Directory.
70109

71110
## Open source on GitHub
72111

73-
112+
The OCR Form Labeling Tool is also available as an open source project on GitHub. The tool is a web application built using React + Redux, and is written in TypeScript. To learn more or contribute, see [OCR Form Labeling Tool](https://github.com/microsoft/OCR-Form-Tools/blob/master/README.md).
74113

75114
## Next steps
76115

77-
Return to the [Train with labels](./quickstarts/label-tool.md) quickstart to learn how to use the tool to manually label training data and do supervised learning.
116+
Use the [Train with labels](./quickstarts/label-tool.md) quickstart to learn how to use the tool to manually label training data and perform supervised learning.
54.4 KB
Loading
112 KB
Loading
30.6 KB
Loading
29.1 KB
Loading
24.7 KB
Loading

0 commit comments

Comments
 (0)