Skip to content

In this repo it is show how to build and deploy a simple pipeline using Kubernetes, Kubeflow pipelines and seldon-core.

License

Notifications You must be signed in to change notification settings

sbakiu/ml-kf-pipeline

Repository files navigation

ml-kf-pipeline

A big challenge business faces is the deployment of machine learning models in production environments. It requires dealing with a complex set of moving workloads through different pipelines. Once the machine learning models are developed, they need to be trained, deployed, monitored and kept track of.

In this repo it is show how to build and deploy a simple pipeline using Kubernetes, Kubeflow pipelines and seldon-core.

Prerequisites

  1. Create an AWS EKS cluster and a node group with at least 3 nodes of size t3.xlarge. Use the instruction from https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html
  2. Connect to the cluster
aws eks --region region update-kubeconfig --name clustername
  1. Install kubeflow-pipelines
git clone https://github.com/kubeflow/pipelines.git
cd pipelines/manifests/kustomize
kubectl apply -k cluster-scoped-resources/
kubectl wait crd/applications.app.k8s.io --for condition=established --timeout=60s
kubectl apply -k env/platform-agnostic/
kubectl wait applications/pipeline -n kubeflow --for condition=Ready --timeout=1800s
kubectl port-forward -n kubeflow svc/ml-pipeline-ui 8080:80

and navigate to localhost:8080 to verify installation.

  1. Install helm. Follow instructions https://helm.sh/docs/intro/install/

  2. Install ambassador in the cluster

kubectl create ns ambassador
helm repo add datawire https://www.getambassador.io
helm install ambassador datawire/ambassador \
  --set image.repository=quay.io/datawire/ambassador \
  --set enableAES=false \
  --set crds.keep=false \
  --namespace ambassador
  1. Install seldon-core in the cluster
kubectl create ns seldon
helm install seldon-core seldon-core-operator \
    --repo https://storage.googleapis.com/seldon-charts \
    --set usageMetrics.enabled=true \
    --set ambassador.enabled=true \
    --set crd.create=true \
    --namespace seldon

Add secrets in the cluster

Make sure to create a secret named aws-secret containing AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY values

kubectl apply -f kubeflow-secret.yaml

Upload the pipeline

  1. Build pipeline
python tokenize_pipeline.py  
  1. Navigate to localhost:8080, upload tokenize_pipeline.py.yaml and trigger execution.

Create SeldonDeployment

kubectl apply -f deployment.yaml

Enjoy!

About

In this repo it is show how to build and deploy a simple pipeline using Kubernetes, Kubeflow pipelines and seldon-core.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published