Deploy MAX models with IBM Cloud Code Engine

Max Models in IBM Cloud
This tutorial focuses on deploying MAX models with IBM Cloud engine using IBM Cloud CLI and Code Engine GUI.

 

IBM Cloud platform combines Infrastructure as a Service (IaaS) with Platform as a Service (PaaS) to offer an integrated experience for their customers. IBM Cloud platform scales and supports both large enterprise businesses and small development organizations and teams. IBM Cloud is deployed across data centers around the globe, which helps customers reduce their website latency. The solutions deployed or built on IBM cloud accelerate fast and perform reliably in both supported and test environments that they can trust.

IBM Cloud offers solutions that enable higher security, compliance, and management levels, with proven architecture methods and patterns for rapid delivery. IBM Cloud also helps to run mission-critical workloads with ease. IBM Cloud data centers are available worldwide, across 19 countries with multizone regions in South and North America, Asia, Europe, and Australia. IBM Cloud is scalable to deploy both local and global applications.

The Code Engine offered by IBM Cloud is a fully managed, serverless platform that runs users’ containerized workloads, including micro-services, web apps, batch jobs, or event-driven functions. Code Engine even builds container images for users from their source code. Since these workloads are all hosted within the same Kubernetes infrastructure, they can seamlessly work together. So, the Code Engine experience is designed to focus on writing code and not on the infrastructure needed to host it.

The Model Asset eXchange (MAX) on IBM Cloud is a place for developers to find and use open-source, free, state-of-the-art deep learning models for common application domains, such as image, audio, text, and video processing.

In this tutorial, we will learn how to use the IBM Cloud Code Engine platform system to deploy the Model Asset Exchange (MAX). 

 

Prerequisites

  • An IBM Cloud account.
  • The IBM Cloud command-line interface (CLI).

 

 If the prerequisites are already available, then the deployment of MAX models with IBM Cloud Engine should take approximately 20 minutes to complete.

 

Process

This tutorial represents two different methods by which a user can deploy Model Asset Exchange (MAX) with IBM Code Engine:

  • IBM Cloud CLI
  • Code Engine GUI

Once the user has deployed MAX using either of these methods, they should verify whether they can access the application.

 

Deploy Model Asset Exchange (MAX) with the IBM CLI

First, the user needs to create a project. The user must always tie code Engine applications to a specific project. To deploy Model Asset Exchange (MAX) with IBM Command Line Interface (CLI), follow the below steps:

1. Open the IBM Cloud Shell.

2. Before running any Code Engine commands, select a resource group. (This will vary depending on the user’s resource group name; we will choose the default resource group in this tutorial.)

 

ibmcloud target -g default

 

3. Next, create an IBM Code Engine project by executing the following command. 

ibmcloud target -g default

 

4. After executing the IBM Code Engine project, the user should see output similar to the example shown below: 

 

ibmcloud ce project create --name sandbox
Creating project 'sandbox'...
ID for project 'sandbox' is 'f8445951-8d47-400c-9833-23e0d60a0811'.
Waiting for project 'sandbox' to be active...
Now selecting project 'sandbox'.
OK

 

5. After creating the project, execute the following command to deploy the Model Asset Exchange (MAX) container as an application. In the below command, note that the –image parameter points to an image registry, and the –port parameter will override the default port (8080).

 

ibmcloud ce application create --name max-object-detector --image quay.io/codait/max-object-detector --port 5000

 

6. The user should see an output similar to the one shown below as a confirmation of the deployment:

 

Creating application 'max-object-detector'...
The Route is still working to reflect the latest desired specification.
Configuration 'max-object-detector' is waiting for a Revision to become ready.
Ingress has not yet been reconciled.
Waiting for load balancer to be ready
Run 'ibmcloud ce application get -n max-object-detector' to check the application status.
OK
https://max-object-detector.75asazy1s7n.us-south.codeengine.appdomain.cloud

 

Deploy Model Asset Exchange (MAX) with the IBM GUI

To deploy MAX models with the Code Engine graphical user interface (GUI), follow the below steps: 

1. First, log in to the IBM Cloud and go to the Code Engine overview page. 

2. Next, enter the following line into the Run a container image text box and click the Start creating button.

quay.io/codait/max-object-detector

 

Max Models in IBM Cloud 1

 

 

 3. On the next screen, create a new project by choosing a region closest to the user, giving it a name, and selecting a resource group.

 

Max Models in IBM Cloud 2

 

 

4. Once the project is created, the user can configure the application. For that, select the following options:

  •  Application or Job: In this section, select Application.
  • Name: In this section, enter a unique name for the application.
  • Project: In this section, select the project that we have created in the previous step.
  • Code to run: Select the Container image that the user wants to run in this section.
  • Image reference: Enter the container image reference in this section, such as quay.io/codait/max-object-detector.
  • Port: Mention the port number in this section, such as 5000.

 

Max Models in IBM Cloud 3

 

 

5. Finally, click the Create button.

 

Verify the Application

Once the application is deployed, users can view the application details from the project view. From the top right of the screen, click the Open application URL button to launch the application.

 

Max Models in IBM Cloud 4

 

 

To use the application instead of the API, add /app at the end of the opened URL and hit the ENTER key.

 

Max Models in IBM Cloud 5

 

 

With Code Engine running the application, users can now interact with the web app using a web camera or by uploading a photo. After the analysis, the MAX object detector will highlight the common objects in the photo submitted.

 

Conclusion

This tutorial presents the steps to deploy a model container from the Model Asset Exchange (MAX) to the cloud with IBM Cloud Code Engine. Hope this tutorial was helpful, and do reach out to us if you have any query or suggestions.

Share this post

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Managed IBM Cloud Services

Focus on your business, and let us take care of your IBM Cloud Infrastructure!
From what you are reading, it seems you are interested in IBM Cloud and related technologies. If you have a moment to spare, please take a look at our Managed IBM Cloud Services, which might interest you even more!
Managed IBM Cloud

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.