AKSDeploymentTutorial/README.md

60 строки
2.7 KiB
Markdown
Исходник Постоянная ссылка Обычный вид История

2018-03-31 23:40:19 +03:00
### Authors: Mathew Salvaris and Fidan Boylu Uz
2018-03-20 13:47:15 +03:00
2018-03-31 23:40:19 +03:00
# Deploy Deep Learning CNN on Kubernetes Cluster with GPUs
## Overview
2018-04-04 21:21:37 +03:00
In this repository there are a number of tutorials in Jupyter notebooks that have step-by-step instructions on how to deploy a pretrained deep learning model on a GPU enabled Kubernetes cluster. The tutorials cover how to deploy models from the following deep learning frameworks:
2018-03-31 23:51:02 +03:00
* [TensorFlow](Tensorflow)
2018-04-04 21:21:37 +03:00
* [Keras (TensorFlow backend)](Keras_Tensorflow)
2018-04-10 13:45:31 +03:00
* Pytorch (Coming soon)
2018-03-31 23:51:02 +03:00
![alt text](static/example.png "Example Classification")
2018-03-31 23:40:19 +03:00
For each framework, we go through the following steps:
2018-03-31 23:40:19 +03:00
* Model development where we load the pretrained model and test it by using it to score images
* Developing the interface our Flask app will use to load and call the model
* Building the Docker Image with our Flask REST API and model
* Testing our Docker image before deployment
* Creating our Kubernetes cluster and deploying our application to it
* Testing the deployed model
2018-04-04 21:21:37 +03:00
* Testing the throughput of our model
* Cleaning up resources
2018-03-31 23:40:19 +03:00
The application we will develop is a simple image classification service, where we will submit an image and get back what class the image belongs to.
2018-03-20 13:47:15 +03:00
If you already have a Docker image that you would like to deploy you can skip the first four notebooks.
2018-03-21 14:44:11 +03:00
## Setting Up
1. Clone the repo:
```bash
git clone <repo web URL>
```
2. Login to Docker with your username and password.
```bash
docker login
```
3. Go to the framework folder you would like to run the notebooks for.
4. Create a conda environment:
```bash
conda env create -f environment.yml
```
5. Activate the environment:
```bash
source activate <environment name>
```
6. Run:
```bash
jupyter notebook
```
7. Start the first notebook and make sure the kernel corresponding to the above environment is selected.
2018-03-31 23:57:39 +03:00
2018-03-21 14:44:11 +03:00
# Contributing
2018-03-31 23:57:39 +03:00
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
2018-03-20 13:47:15 +03:00