In the last post, I discussed about how to deploy a Sample Label Tool for Form Recognizer using Docker on a local Windows machine. But that does not allow a team to collaborate efficiently, that is to say, if multiple persons are working on training the Form Recognizer, they will all have to setup the tool individually on their machines and moreover, will have to continuously follow up with each other to keep in sync.
Well, this can be avoided by deploying the Sample Label Cloud on Azure Cloud using Azure Container Instance (Web App). In this way, the sample label tool can be accessed via a URL in any browser. In this post , I will show you the steps to get started with this.
Step 1: Create a Web App
1. Sign in to your Azure Account.
2. On Home Page, click on + Create a resource.
3. Search for Web App in Search Bar and select it.
4. Click on Create.
5. On Basics tab, fill out the information as described below.
|Subscription||Select you azure subscription|
|Resource Group||Create a new resource group or use an existing one, if already have. Resource group helps in grouping related resources.|
|Name||Give a name to your web app. It cannot have space.|
|Publish||Select Docker Container|
|Operating System||Select Linux|
|Region||Select a region as per your choice. Logically it should be closer to region from where the resource is going to be accessed.|
|Linux Plan||Choose the option created by default.|
|Sku and size||Select default option or change as per your requirement.|
6. Next, click on Next: Docker > or select the Docker tab. Then, fill the information as described below.
|Options||Select Single Container|
|Image Source||Select Private Registry|
|Username||Create a username|
|Password||Create a password that you can remember|
|Image and tag||Select value as per form recognizer version you want to use.|
|Startup Command||./run.sh eula=accept|
7. Next, Click on Review + Create. Review all the information provided and then click on Create. Deployment of resource (Web App) will take some time. Once it is deployed, you will get a notification.
8. Click on Go to resource, once deployment is complete.
9. On Overview page of new Web App created, click on the URL on right side of page. A new tab will open, displaying Form Recognizer’s Sample Label Tool.
Hurray!! you have successfully deployed the Sample Label Tool on Azure Container Instance (Web App).
Step 2: Add Authentication
Currently, anyone can access your Web App (Sample Label Tool) via the URL used above. You can connect your Web App to Azure Active Directory to provide Authentication. This ensures that only users with valid credentials can sign in and use your web app.
1. Go to your Web App and select Authentication / Authorization from left sidebar.
2. Toggle App Service Authentication to On.
3. Select Azure Active Directory under Authentication Providers.
4. In the window that appears, choose options as described in below table and then Click OK.
|Management mode||Create New AD App|
|Create App||Give a name.|
5. Select Log in with Azure Active Directory under Action to take when request is not authenticated.
6. Click on Save to save the form.
You have successfully added authentication to your Web App. Now, when you will visit the URL of your Web App, it was ask for your Microsoft Azure Credentials to log in.
In this post, you deployed the Form Recognizer Sample Label Tool on Azure Container Instance (Web App) and also added Authentication to it, so that a user with valid credentials can only access it.