From 8c9d6d2c84ca89668130c8118cc53256f675609b Mon Sep 17 00:00:00 2001 From: Aleksandr Panchul Date: Tue, 29 Sep 2020 11:30:20 -0700 Subject: [PATCH 1/2] adding Azure Stack Edge info and links --- Research/deploying-model-on-k8s/Readme.md | 5 +++- .../production-deploy-to-k8s-gpu.ipynb | 29 ++++++++++++------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Research/deploying-model-on-k8s/Readme.md b/Research/deploying-model-on-k8s/Readme.md index 77da6452c..df830f687 100644 --- a/Research/deploying-model-on-k8s/Readme.md +++ b/Research/deploying-model-on-k8s/Readme.md @@ -7,6 +7,9 @@ This section guides you through the steps needed to deploy a model for inferenci 1. Have a valid Microsoft Azure subscription 2. Be able to provision GPU-enabled VMs 3. Have access to VM image repository (DockerHub account, or ACR) +4. Be able to run `kubectl`, configured to your cluster +5. If you are using Edge device, you should be able to complete this step on AS Edge https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-j-series-deploy-stateless-application-kubernetes + Clone this repository somewhere so you can easily access the different source files: @@ -242,7 +245,7 @@ For more information, please see [Pull an Image from a Private Registry](https:/ In the following steps we denote the image as `1234567dedede1234567ceeeee.azurecr.io/tfgpu:1.0`, you can tag your own image adhering to the naming conventions you like. -## Creating a Deployment +## Creating a Deployment on an Edge Device or another Kubernetes cluster We provide the Deployment file, `deploy_infer.yaml`: diff --git a/Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb b/Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb index a76ae6fd6..e94864a7c 100644 --- a/Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb +++ b/Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb @@ -271,7 +271,7 @@ "outputs": [], "source": [ "# provide name of azure contaienr image and tag \n", - "imagename= \"tfgpu\"\n", + "imagename= \"tfgpuk8s\"\n", "imagelabel=\"1.0\"" ] }, @@ -341,7 +341,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Preparing Kubernetes Deployment file\n", + "## Preparing Deployment file for AS Edge or another Kubernetes cluster.\n", "\n", "Below is the template for our Kubernetes deployments. We create it within this notebook for visibility, for more complex deployments you can make it part of source control repository.\n", "\n", @@ -356,7 +356,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## kubectl\n", + "## Validating kubectl on AS Edge\n", + "\n", + "If you created your cluster on Azure Stack Edge using aks-engine, you will have `kubectl`. You can check the version:\n", + "\n", + " $ kubectl version --client\n", + " Client Version: version.Info{Major:\"1\", Minor:\"19\", GitVersion:\"v1.19.2\",\n", + " GitCommit:\"f5743093fd1c663cb0cbc89748f730662345d44d\", GitTreeState:\"clean\",\n", + " BuildDate:\"2020-09-16T13:41:02Z\", GoVersion:\"go1.15\", Compiler:\"gc\", Platform:\"linux/amd64\"}\n", + " \n", + "For more information, visit https://docs.microsoft.com/en-us/azure/databox-online/azure-stack-edge-j-series-deploy-stateless-application-kubernetes\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Validating kubectl on a generic Kubernetes cluster\n", "\n", "You also need `kubectl`. If the following command fails, see https://kubernetes.io/docs/tasks/tools/install-kubectl/\n", "\n", @@ -615,13 +631,6 @@ "except KeyError as e:\n", " print(str(e))" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From 2fbb895b925b343fda6bf19583719ba4d2ebcd6d Mon Sep 17 00:00:00 2001 From: Aleksandr Panchul Date: Tue, 29 Sep 2020 11:32:44 -0700 Subject: [PATCH 2/2] moving deploying-on-k8s chapter to notebooks section --- .../deploying-model-on-k8s/.gitignore | 0 .../deploying-model-on-k8s/Readme.md | 0 .../deploying-model-on-k8s/create_secret.sh | 0 .../deploying-model-on-k8s/demo_notebook.py | 0 .../deploying-model-on-k8s/deploy_infer.yaml | 0 .../deploying-model-on-k8s/expose_infer.sh | 0 .../pics/conf_file_download.JPG | Bin .../pics/jupiter_lab_azureml-sdk.png | Bin .../production-deploy-to-k8s-gpu.ipynb | 0 .../deploying-model-on-k8s/runtest_infer.py | 0 .../deploying-model-on-k8s/snowleopardgaze.jpg | Bin 11 files changed, 0 insertions(+), 0 deletions(-) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/.gitignore (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/Readme.md (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/create_secret.sh (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/demo_notebook.py (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/deploy_infer.yaml (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/expose_infer.sh (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/pics/conf_file_download.JPG (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/pics/jupiter_lab_azureml-sdk.png (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/runtest_infer.py (100%) rename {Research => machine-learning-notebooks}/deploying-model-on-k8s/snowleopardgaze.jpg (100%) diff --git a/Research/deploying-model-on-k8s/.gitignore b/machine-learning-notebooks/deploying-model-on-k8s/.gitignore similarity index 100% rename from Research/deploying-model-on-k8s/.gitignore rename to machine-learning-notebooks/deploying-model-on-k8s/.gitignore diff --git a/Research/deploying-model-on-k8s/Readme.md b/machine-learning-notebooks/deploying-model-on-k8s/Readme.md similarity index 100% rename from Research/deploying-model-on-k8s/Readme.md rename to machine-learning-notebooks/deploying-model-on-k8s/Readme.md diff --git a/Research/deploying-model-on-k8s/create_secret.sh b/machine-learning-notebooks/deploying-model-on-k8s/create_secret.sh similarity index 100% rename from Research/deploying-model-on-k8s/create_secret.sh rename to machine-learning-notebooks/deploying-model-on-k8s/create_secret.sh diff --git a/Research/deploying-model-on-k8s/demo_notebook.py b/machine-learning-notebooks/deploying-model-on-k8s/demo_notebook.py similarity index 100% rename from Research/deploying-model-on-k8s/demo_notebook.py rename to machine-learning-notebooks/deploying-model-on-k8s/demo_notebook.py diff --git a/Research/deploying-model-on-k8s/deploy_infer.yaml b/machine-learning-notebooks/deploying-model-on-k8s/deploy_infer.yaml similarity index 100% rename from Research/deploying-model-on-k8s/deploy_infer.yaml rename to machine-learning-notebooks/deploying-model-on-k8s/deploy_infer.yaml diff --git a/Research/deploying-model-on-k8s/expose_infer.sh b/machine-learning-notebooks/deploying-model-on-k8s/expose_infer.sh similarity index 100% rename from Research/deploying-model-on-k8s/expose_infer.sh rename to machine-learning-notebooks/deploying-model-on-k8s/expose_infer.sh diff --git a/Research/deploying-model-on-k8s/pics/conf_file_download.JPG b/machine-learning-notebooks/deploying-model-on-k8s/pics/conf_file_download.JPG similarity index 100% rename from Research/deploying-model-on-k8s/pics/conf_file_download.JPG rename to machine-learning-notebooks/deploying-model-on-k8s/pics/conf_file_download.JPG diff --git a/Research/deploying-model-on-k8s/pics/jupiter_lab_azureml-sdk.png b/machine-learning-notebooks/deploying-model-on-k8s/pics/jupiter_lab_azureml-sdk.png similarity index 100% rename from Research/deploying-model-on-k8s/pics/jupiter_lab_azureml-sdk.png rename to machine-learning-notebooks/deploying-model-on-k8s/pics/jupiter_lab_azureml-sdk.png diff --git a/Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb b/machine-learning-notebooks/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb similarity index 100% rename from Research/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb rename to machine-learning-notebooks/deploying-model-on-k8s/production-deploy-to-k8s-gpu.ipynb diff --git a/Research/deploying-model-on-k8s/runtest_infer.py b/machine-learning-notebooks/deploying-model-on-k8s/runtest_infer.py similarity index 100% rename from Research/deploying-model-on-k8s/runtest_infer.py rename to machine-learning-notebooks/deploying-model-on-k8s/runtest_infer.py diff --git a/Research/deploying-model-on-k8s/snowleopardgaze.jpg b/machine-learning-notebooks/deploying-model-on-k8s/snowleopardgaze.jpg similarity index 100% rename from Research/deploying-model-on-k8s/snowleopardgaze.jpg rename to machine-learning-notebooks/deploying-model-on-k8s/snowleopardgaze.jpg