Skip to Content
Technical Articles
Author's profile photo Frank Schuler

Prototype your SAP Data Intelligence ML Scenario with Docker Desktop

Previously, I described how to Prototype your SAP Data Intelligence ML Scenario on Raspberry Pi.

Inspired by Ravi Mittal’s excellent blog Manage your First Container using Kubernetes in SAP Cloud Platform, Kyma Runtime I got intrigued to use Docker Desktop instead.

Who would have thought that it comes with Kubernetes?

Adding Kubernetes Dashboard (see Appendix)

And JupyterHub (see Appendix) is easy enough. With this I create my Jupyter Notebook as before to import into SAP Data Intelligence later

On top I got complete control of my Containers / Apps

How cool is that?

Appendix

Kubernetes Dashboard

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.3.1/aio/deploy/recommended.yaml
kubectl patch deployment kubernetes-dashboard -n kubernetes-dashboard --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--enable-skip-login"}]'
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml
kubectl patch deployment metrics-server -n kube-system --type 'json' -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
kubectl proxy

JupyterHub

helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo update
helm upgrade --install jupyterhub jupyterhub/jupyterhub

Notebook

pip install sklearn
pip install matplotlib
from sklearn import datasets
from matplotlib import pyplot
df = datasets.load_iris()
x = df.data
y_true = df.target
fig = pyplot.figure()
ax = fig.add_subplot(projection='3d')
ax.scatter(x[:,2],x[:,1],x[:,0],c=y_true)
ax.set_xlabel(df.feature_names[2])
ax.set_ylabel(df.feature_names[1])
ax.set_zlabel(df.feature_names[0])
fig

Assigned tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.