Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

  1. Blog
  2. Article

Andreea Munteanu
on 8 November 2022

A hands-on guide to work with MindSpore on Kubeflow


Looking at the report that Gartner did in 2022 regarding top technology trends, AI engineering represents an important pillar in the near future. It is composed of three core technologies: DataOps, MLOps and DevOps.The discipline’s main purpose is to develop AI models that can quickly and continuously provide business value. For instance, models that enable cross-functional collaboration, automation, data analysis, and machine learning. AI engineering shortens the development and deployment processes.

What is Kubeflow?

Charmed Kubeflow is a production-grade, end-to-end MLOps platform that translates steps in the data science workflow into Kubernetes jobs. It is one of the official distributions of the Kubeflow upstream project. Using it, data scientists and machine learning engineers benefit from having ML deployments that are simple, portable and scalable. It has capabilities that cover a wide range, from experimentation using Notebooks, to training using the Kubeflow Pipelines or tuning, using Katib.

Learn more about what is Kubeflow?

What is MindSpore?

MindSpore is an open-source AI framework built for deep learning, training and inference, that is used for edge, mobile and cloud scenarios. It implemented automatic differentiation based on source transformation. This is a technology evolving from the functional programming framework and it supports automatic control flow.

Learn more aboutMindspore.

Why integrate Kubeflow and Mindspore?

Charmed Kubeflow is an MLOps platform, composed of various open-source components. Jupyter Notebooks is one of the tools that are natively available. Having integration with an AI Framework enables data scientists and machine learning engineers to benefit from advanced training capabilities and a cost model-splitting strategy. It combines data parallelism, model parallelism and hybrid parallelism. It leads on the one hand to execution efficiency, at the pipeline, deep graph or on-device level, as well as development friendliness, because of the automatic differential, parallelisation and optimisation.  

Overall, the integration between Charmed Kubeflow and MindSpore highlights the growing MLOps ecosystem that Canonical is working on building. Juggling between tools, especially when working with data can be easily challenging. Thus, charmed Kubeflow aims to solve this problem, by creating an environment that natively offers access to various AI/ML tools.

Access Charmed Kubeflow

If you have not deployed Charmed Kubeflow, please follow the instructions from the Quickstart guide to deploy it. Please bear in mind that you need to run Ubuntu 20.04 or later with, a minimum of 32GB of free memory and 50GB of disk space. During the deployment process, you will

  • Install MicroK8s
  • Install Juju
  • Deploy Charmd Kubeflow

Once Charmed Kubeflow is deployed and all Kubeflow components have the active status, please follow the instructions below.

juju refresh jupyter-ui --channel=latest/edge 

This step updates jupyter-ui to the latest version, so it includes MindSpore’s Notebook image.

Configure Charmed Kubeflow

After Kubeflow is installed, you need to do a simple configuration to access it. First configure the access address:

juju config dex-auth public-url=http://10.64.140.43.nip.io
juju config oidc-gatekeeper public-url=http://10.64.140.43.nip.io

Then configure the username and password for access:

juju config dex-auth static-username=admin
juju config dex-auth static-password=ucantseeme

Next, enter http://10.64.140.43.nip.io in the browser,  and the user password you just set. Then you can see the complete Dashboard of Kubeflow.

Run MindSpore-enabled Notebooks

In order to access MindSpore within Charmed Kubeflow, you will need to use the natively enabled Notebooks. On the Notebook tab, from the Charmed Kubeflow dashboard, select Create Notebook, enter the notebook name MindSpore, select jupyterlab for the image, use mindspore/jupyter-mindspore from the list, allocate appropriate CPU and content resources, and click Create.

In the Notebook interface, you can see the prompt that the creation is completed soon.

Click Connect, we can open the notebook in another browser tab page. Here we can use the existing notebook on MindSpore’s official website to upload the handwritten digit recognition notebook through the notebook page.

Click Execute, and you can see that the notebook is running directly without additional installation of MindSpore and Vision suites.

Get started with your first project

Once you have the MindSpore image natively enabled in your Notebook from Charmed Kubeflow, you can go ahead and start your AI/ML projects. Whereas MindSpore is designed to support a wide range of use cases, computer vision might be an interesting example.

Learn more about Charmed Kubeflow and MindSpore

Related posts


Andreea Munteanu
1 November 2024

Charmed Kubeflow vs Kubeflow

AI Article

Why should you use an official distribution of Kubeflow? Kubeflow is an open source MLOps platform that is designed to enable organizations to scale their ML initiatives and automate their workloads. It is a cloud-native solution that helps developers run the entire machine learning lifecycle within a single solution on Kubernetes. It can ...


Andreea Munteanu
17 April 2024

What is MLflow?

AI Article

MLflow is an open source platform, used for managing machine learning workflows. It was launched back in 2018 and has grown in popularity ever since, reaching 10 million users in November 2022. AI enthusiasts and professionals have struggled with experiment tracking, model management and code reproducibility, so when MLflow was launched, ...


Andreea Munteanu
22 March 2024

A deep dive into Kubeflow pipelines 

AI Article

Widely adopted by both developers and organisations, Kubeflow is an MLOps platform that runs on Kubernetes and automates machine learning (ML) workloads. It covers the entire ML lifecycle, enabling data scientists and machine learning engineers to develop and deploy ML models. Kubeflow is designed as a suite of leading open source project ...