From 936efb6b854e0b6525d181dbdafe6c8228c0b507 Mon Sep 17 00:00:00 2001 From: "Wang,Long" Date: Mon, 23 Dec 2019 15:57:05 +0000 Subject: [PATCH] update README for kubernetes deployment Signed-off-by: Wang,Long --- numpy-mp/README.md | 29 ++++++++++++++++++++++++++ numpy-mp/numpy-mp-demo-deployment.yaml | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/numpy-mp/README.md b/numpy-mp/README.md index 1fafc15..a542e52 100644 --- a/numpy-mp/README.md +++ b/numpy-mp/README.md @@ -54,6 +54,35 @@ Docker Hub. docker run -d clearlinux/numpy-mp ``` +### Deploy with Kubernetes +This image can also be deployed on a Kubernetes cluster, such as +[minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/). The +following example YAML file is provided in the repository as +reference for Kubernetes deployment: + + * [`numpy-mp-demo-deployment.yaml`](https://github.com/clearlinux/dockerfiles/blob/master/numpy-mp/numpy-mp-demo-deployment.yaml): + yaml file to deploy the numpy-mp workload example + +To deploy the image on a Kubernetes cluster: + + * Start the numpy-mp workload example. + ``` + kubectl apply -f numpy-mp-demo-deployment.yaml + ``` + + * Then check if the pods are running well. + ``` + kubectl get pods -o wide + ``` + This may take some time because it requires downloading the image. + Note, if your cluster is behind some proxy, you may need set the proxy + environment in the yaml file. + + * Get the workload result + ``` + kubectl logs --follow=true -f deployment/numpy-mp-deploy + ``` + ### OMP Configurations The OMP parameters for numpy-mp container could be configured via following environment variable. diff --git a/numpy-mp/numpy-mp-demo-deployment.yaml b/numpy-mp/numpy-mp-demo-deployment.yaml index 3edd132..66fa354 100644 --- a/numpy-mp/numpy-mp-demo-deployment.yaml +++ b/numpy-mp/numpy-mp-demo-deployment.yaml @@ -96,7 +96,7 @@ spec: # - name: OMP_NUM_THREADS # value: "" - name: OPENBLAS_LOOPS - value: "10000" + value: "2000" args: - "python3" - "sgemm.py"