|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "# Lab: Deploy your ML/DL model as a scalable API\n", |
| 7 | + "# Lab: Deploy your ML/DL model as a scalable API in 60 minutes\n", |
8 | 8 | "\n", |
9 | 9 | "Repo: https://github.com/microsoft/AIforEarth-API-Development\n", |
10 | 10 | "\n", |
11 | | - "For more detailed explanation of each step, see our [Quickstart](https://github.com/microsoft/AIforEarth-API-Development/blob/master/Quickstart.md#ai-for-earth---quickstart-tutorial)." |
| 11 | + "This document is meant to be a lab walk-through, so it contains all the instructions for you to complete the steps easily, but has minimal explanation on _how_ the technologies involved work or _why_ we use them.\n", |
| 12 | + "\n", |
| 13 | + "For more motivation for deploying machine learning models as APIs as a way to make your work available to the community and detailed explanation of each step, see our [Quickstart](https://github.com/microsoft/AIforEarth-API-Development/blob/master/Quickstart.md#ai-for-earth---quickstart-tutorial) or the main [Readme](https://github.com/Microsoft/AIforEarth-API-Development/#ai-for-earth---creating-apis) on this repo." |
12 | 14 | ] |
13 | 15 | }, |
14 | 16 | { |
|
19 | 21 | "\n", |
20 | 22 | "There are two options for working through the lab:\n", |
21 | 23 | "\n", |
22 | | - "-\tUsing your laptop. Make sure to have Docker installed and working. Instructions for all operating systems can be found here: https://docs.docker.com/install/\n", |
| 24 | + "1. Using your laptop. Make sure to have Docker installed and working. Instructions for all operating systems can be found here: https://docs.docker.com/install/\n", |
| 25 | + " - Even if you’re running Windows, we use Linux containers for model deployment. When the Docker Desktop installer asks you:\n", |
| 26 | + " - If you want to use Windows containers, say “no” (i.e., don’t check the box that says “use Windows containers instead of Linux containers”)\n", |
| 27 | + " - If you want to reboot to enable Hyper-V so you can run Linux containers, say “yes”\n", |
| 28 | + "\n", |
23 | 29 | "\n", |
24 | | - "-\tUsing an Azure Data Science Virtual Machine for Linux (Ubuntu) (important to get the *Linux* version, not Windows), where Docker is already installed. Make sure you have access to an Azure Subscription and have the VM created there, and that you have good tools for editing code on the Linux VM (comfortable with emacs/vim, or use VS Code plug-ins, Sublime SFTP package, PyCharm Professional with deployment support, etc).\n", |
| 30 | + "2. Using an Azure Data Science Virtual Machine for Linux (Ubuntu) (important to get the *Linux* version, not Windows), where Docker is already installed. Make sure you have access to an Azure Subscription and have the VM created there, and that you have good tools for editing code on the Linux VM (comfortable with emacs/vim, or use VS Code plug-ins, Sublime SFTP package, PyCharm Professional with deployment support, etc).\n", |
25 | 31 | "\n", |
26 | 32 | "If you would like to deploy a model of your own during the lab instead of using a sample model, make sure to have the model file at hand and a Python or R script for loading the model and performing inference on incoming data. \n", |
27 | 33 | "\n", |
28 | | - "If you would like to go through the \"deploy remotely\" section of this tutorial, it's best to have Azure CLI [installed](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) in your environment so you can log into an Azure Container Registry. " |
| 34 | + "If you would like to go through the \"deploy remotely\" section of this tutorial, it's best to have Azure CLI [installed](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) in your environment so you can log into an Azure Container Registry. This assumes that you have access to an Azure subscription." |
29 | 35 | ] |
30 | 36 | }, |
31 | 37 | { |
|
34 | 40 | "source": [ |
35 | 41 | "## 2. Motivation\n", |
36 | 42 | "\n", |
37 | | - "Idea is that you can use our Framework to develop and test an API locally, and the resulting container can be “dropped in” and deployed on our scalable, Kubernetes-based platform with no additional changes (local libraries are swapped with distributed/scalable versions)." |
| 43 | + "The idea is that you can use our Framework to develop and test an API locally, and the resulting container can be “dropped in” and deployed on our scalable, Kubernetes-based [platform](https://github.com/microsoft/AIforEarth-API-Platform/) with no additional changes (local libraries are swapped with distributed/scalable versions)." |
38 | 44 | ] |
39 | 45 | }, |
40 | 46 | { |
|
151 | 157 | { |
152 | 158 | "cell_type": "code", |
153 | 159 | "execution_count": 1, |
154 | | - "metadata": { |
155 | | - "collapsed": false |
156 | | - }, |
| 160 | + "metadata": {}, |
157 | 161 | "outputs": [ |
158 | 162 | { |
159 | 163 | "name": "stdout", |
|
186 | 190 | { |
187 | 191 | "cell_type": "code", |
188 | 192 | "execution_count": 2, |
189 | | - "metadata": { |
190 | | - "collapsed": false |
191 | | - }, |
| 193 | + "metadata": {}, |
192 | 194 | "outputs": [ |
193 | 195 | { |
194 | 196 | "name": "stdout", |
|
215 | 217 | { |
216 | 218 | "cell_type": "code", |
217 | 219 | "execution_count": 3, |
218 | | - "metadata": { |
219 | | - "collapsed": false |
220 | | - }, |
| 220 | + "metadata": {}, |
221 | 221 | "outputs": [], |
222 | 222 | "source": [ |
223 | 223 | "task_id = r.text.split('TaskId: ')[1]" |
|
226 | 226 | { |
227 | 227 | "cell_type": "code", |
228 | 228 | "execution_count": 4, |
229 | | - "metadata": { |
230 | | - "collapsed": false |
231 | | - }, |
| 229 | + "metadata": {}, |
232 | 230 | "outputs": [ |
233 | 231 | { |
234 | 232 | "name": "stdout", |
|
373 | 371 | { |
374 | 372 | "cell_type": "code", |
375 | 373 | "execution_count": 5, |
376 | | - "metadata": { |
377 | | - "collapsed": false |
378 | | - }, |
| 374 | + "metadata": {}, |
379 | 375 | "outputs": [ |
380 | 376 | { |
381 | 377 | "name": "stdout", |
|
455 | 451 | "metadata": { |
456 | 452 | "anaconda-cloud": {}, |
457 | 453 | "kernelspec": { |
458 | | - "display_name": "Python [tensorflow]", |
| 454 | + "display_name": "Python [conda env:tensorflow]", |
459 | 455 | "language": "python", |
460 | | - "name": "Python [tensorflow]" |
| 456 | + "name": "conda-env-tensorflow-py" |
461 | 457 | }, |
462 | 458 | "language_info": { |
463 | 459 | "codemirror_mode": { |
|
473 | 469 | } |
474 | 470 | }, |
475 | 471 | "nbformat": 4, |
476 | | - "nbformat_minor": 0 |
| 472 | + "nbformat_minor": 1 |
477 | 473 | } |
0 commit comments