Deploy AI Library on Microsoft Azure

This guide will help you deploy the AI Library Platform on Microsoft Azure. This guide will use a mix of CLI (Azure and Docker) and VS Code Extensions (Docker, Azure App Service and Azure Containter Apps).

In this guide, you will learn how to:

  • Pull the AI Library Docker image from Docker Hub
  • Create a new Azure Container Registry
  • Push the AI Library Docker image to Azure Container Registry
  • Deploy the AI Library Platform on Azure Container Apps.

Prerequisites

Install the Azure CLI and log in to your Azure account.

Install Azure CLI You can skip this step if you already have the Azure CLI installed and are logged in.

# Use the command below to install Azure CLI in MacOS or Linux using HomeBrew
# Get HomeBrew from https://brew.sh/
# For other OS, check the documentation.
brew update && brew install azure-cli 
az login

Pull the AI Library core container image.

docker pull araniail/backend:latest

Create a container registry in Azure.

Note: Skip this step if you already have a container registry that you can use

az acr create --resource-group <resource-group-name> --name <your-registry-name> --sku Basic

Alternatively, you can create a container registry using the Azure portal. Follow the steps here.

Tag the image with the Azure Container Registry name.

docker tag ailibrary.azurecr.io/core:latest <your-registry-name>.azurecr.io/ai-library:latest

Push the image to the Azure Container Registry.

docker push <your-registry-name>.azurecr.io/ai-library:latest

Create a Container Apps Environment in Azure.

  • Open the Azure tab in Visual Studio Code.
  • Right-click on Container Apps and click on Create Container Apps Environment.
  • Once the environment is created, right-click on the environment and click on Create Container App.

Deploy the AI Library Platform on Azure Container Apps

  • Open Docker tab
  • Right click on the image you pushed to the Azure Container Registry and click on Deploy to Container Apps
  • Select the Subscription
  • Select the Container Apps Environment you created in the previous step
  • Select the Container you created in the previous step
  • Enable ingress (HTTP) with public access
  • Select the port 8000
  • Select the environment file. Download the sample file from here and update the values.
  • Get the ingress URL from the Azure portal and access the AI Library Platform. You can also right-click on the container and click on properties and get the url from configuration > ingress > fqdn.
  1. Deploy a containerized app to Azure from Visual Studio Code.
  2. Push your first image to your Azure container registry using the Docker CLI from Microsoft Azure.

Was this page helpful?