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.
- 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 - Connect to the cluster
aws eks --region region update-kubeconfig --name clustername- 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:80and navigate to localhost:8080 to verify installation.
-
Install helm. Follow instructions https://helm.sh/docs/intro/install/
-
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- 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 seldonMake 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- Build pipeline
python tokenize_pipeline.py - Navigate to
localhost:8080, uploadtokenize_pipeline.py.yamland trigger execution.
kubectl apply -f deployment.yamlEnjoy!