No frills pipelines
Kai automates the management and integration of kai-piper which enables users to easily define and execute pipelines. Kai also defines several higher level resources on top of the Kubernetes API that make it easier to define, deploy and manage your pipelines.
For more detailed information please see the docs at kai-docs and we encourage everyone to join the kai-discord server.
The quickest way to get up and running with Kai is to clone the repo and run the quickstart using make. This will create a cluster using kind, build and deploy the controller, and deploy an example pipeline.
git clone https://github.com/dreamstax/kai && cd kai
make quickstart
note: this section is wip as we do not yet have a first release
Use kubectl
to install the CRDs and deploy the controller to your cluster.
kubectl apply -f {github-release-url}
Create a new pipeline by defining a Pipeline resource.
# pipeline.yaml
apiVersion: core.kai.io/v1alpha1
kind: Pipeline
metadata:
name: image-classifier
spec:
steps:
- spec:
model:
modelFormat: pytorch
uri: gs://kfserving-examples/models/torchserve/image_classifier/v1
Then apply this pipeline resource to the cluster.
kubectl apply -f pipeline.yaml
note: this section is wip as we build out kai-piper
- retrieve pipeline ID (pipeline resource could expose this, also available via kai-piper)
- port-forward kai-piper server (could also be registered on an ingress gateway)
- call
/v1alpha1/pipelineJobs/{job_id}:run
The Kai controller provides the following features
- Pipeline orchestration and management via kai-piper
- Service Deployment - Kai can register your pipelines and deploy your steps via a consolidated API (similar to KServe/KNative) which can make adopting Kubernetes a much easier process.
- Kubernetes native scaling - piper is a simple orchestrator and your steps run as standard Kubernetes deployments allowing you to configure HPA's and resources separately from the pipeline orchestration.
- Flexibility - Since steps are just deployments with services you can configure Kai to execute steps outside of it's control plane. This makes it easy for users with existing model deployments or workloads to migrate. Additionally since Kai is only orchestrating the execution of your steps your workloads won't have a large dependency on it's API.
For people interested in contributing to Kai please check out our open issues on GitHub. For bug reports or feature requests please add the appropriate tag to your issue so it can be triaged appropriately. We also strongly encourage members of the community to join the kai-discord server, where you'll be able to communicate with maintainers and other members about Kai.
In order to develop for Kai you'll need the following dependencies
- Go >= 1.20
The easiest way to get started is by cloning this repo and running make to install and setup all other dependencies
git clone https://github.com/dreamstax/kai && cd kai
make quickstart
This is an exhaustive build and install of all required dependencies and assumes nothing exists. This is mostly useful for initial repo pulls or starting from scratch. You can see a list of commands that are run within the makefile and perform the ones necessary during development.
After completion of the make command, ensure the controller is running in the cluster by checking the pods within the namespace.
kubectl get pods -n kai-system
Oftentimes when making changes to the controller it's nice to just run the controller locally and not in the cluster. To achieve this run the following command.
make dev
This will build the manifests and install the CRDs into the cluster then run the controller in your current terminal window. For a tighter iteration loop, familiarize yourself with the make targets and just run what you need.
Kai aims to be a simple and modern solution for defining and deploying pipelines for local, research, or production environments.
This project draws inspiration from KNative, KServe, Argo, and Cadence. We hope to provide a modern and simple alternative to some of the same problems those projects aim to solve.
This project is currently in early alpha. Deployment to production is not recommended. As a project in early alpha you can expect frequent breaking and non-breaking changes.
We hope to gather community feedback around all aspects of the project both current and future.
Copyright 2023 The Kai Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.