8

Prototype your SAP Data Intelligence ML Scenario with Docker Desktop

 3 years ago
source link: https://blogs.sap.com/2021/08/15/prototype-your-sap-data-intelligence-ml-scenario-with-docker-desktop/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
August 15, 2021 1 minute read

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?

Kubernetes.png

Adding Kubernetes Dashboard (see Appendix)

Dashboard.png

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

jupyterhub.png

On top I got complete control of my Containers / Apps

docker.png

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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK