
Deploying deep learning models with docker and kubernetes how to#
For instructions on how to do that on Azure see here
Port 9999 open: Jupyter notebook will use port 9999 so please ensure that it is open. NOTE: Even with docker installed you may need to set it up so that you don't require sudo to execute docker commands see "Manage Docker as a non-root user" The tutorial was developed on an Azure Linux DSVM NOTE: The tutorial goes through step by step how to deploy a deep learning model on Azure it does not include enterprise best practices such as securing the endpoints and setting up remote logging etc.ĭeploying with GPUS: For a detailed comparison of the deployments of various deep learning models, see the blog post here which provides evidence that, at least in the scenarios tested, GPUs provide better throughput and stability at a lower cost. If you already have a Docker image that you would like to deploy you can skip the first four notebooks. The scoring result is then piped into a JSON object and returned to the client. The image is then appropriately preprocessed and sent to the model for scoring. The Flask app extracts the image from the request. The client sends a HTTP POST request with the encoded image data. The application flow for the deep learning model is as follows: 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. Creating our Kubernetes cluster and deploying our application to it. Testing our Docker image before deployment. Building the Docker Image with our Flask REST API and model. Developing the interface our Flask app will use to load and call the model. Model development where we load the pretrained model and test it by using it to score images.
The tutorials cover how to deploy models from the following deep learning frameworks:įor each framework, we go through the following steps: 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.
Authors: Mathew Salvaris and Fidan Boylu Uz Deploy Deep Learning CNN on Kubernetes Cluster with GPUs Overview This repo is no longer actively maintained, please see newer version available using Azure Machine Learning here.