mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-11-22 03:22:45 +00:00
Organizational and line-edits include:
- Moved and revised summary para. of 2 versions to intro - Added internal TOC for user nav - Simplified Prerequisites - Revise para. as numbered steps in TensorFlow single and multi-node - Revised for consistent use of multi-node - Added URIs for TensorFlow and KubeFlow Signed-off-by: Michael Vincerra <michael.vincerra@intel.com>
This commit is contained in:
@@ -3,22 +3,35 @@
|
||||
Deep Learning as a Service
|
||||
##########################
|
||||
|
||||
This tutorial explains how to run benchmarking workloads in |CL-ATTR| using
|
||||
TensorFlow* and Kubeflow with the Intel® Deep Learning Stack.
|
||||
This tutorial shows you how to run benchmarking workloads in |CL-ATTR| using
|
||||
TensorFlow\* and Kubeflow with the Intel® Deep Learning Stack.
|
||||
|
||||
The Intel® Deep Learning Stack is available in two versions. The first is
|
||||
`Eigen`_, which includes `TensorFlow`_ optimized for Intel® architecture. The
|
||||
second is `Intel MKL`_, which includes the TensorFlow framework optimized
|
||||
using Intel® Math Kernel Library for Deep Neural Networks (Intel® MKL-DNN)
|
||||
primitives.
|
||||
|
||||
.. contents:: :local:
|
||||
:depth: 1
|
||||
|
||||
Release notes
|
||||
=============
|
||||
|
||||
View current `release notes`_ for the Intel® Deep Learning Stack.
|
||||
|
||||
.. note::
|
||||
|
||||
Performance test numbers in the Intel® Deep Learning Stack were obtained using `runc` as the runtime.
|
||||
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
* |CL| is installed on host system. If not, :ref:`bare-metal-install`
|
||||
* `containers-basic` bundle is installed
|
||||
* `cloud-native-basic` bundle is installed
|
||||
* |CL| installed on host system. If not installed, :ref:`bare-metal-install`
|
||||
* `containers-basic` bundle
|
||||
* `cloud-native-basic` bundle
|
||||
|
||||
In |CL|, `containers-basic` provides Docker*, which is required for
|
||||
In |CL|, `containers-basic` provides Docker\*, which is required for
|
||||
TensorFlow benchmarking. Use the :command:`swupd` utility to check if
|
||||
`containers-basic` and `cloud-native-basic` are present:
|
||||
|
||||
@@ -32,48 +45,41 @@ If you need to install the `containers-basic` or `cloud-native-basic`, enter:
|
||||
|
||||
sudo swupd bundle-add containers-basic cloud-native-basic
|
||||
|
||||
.. TODO: Resolve issue: Are we installing kubernetes in the bare metal or in the Virtual environment. F-up with DnPlas, bd-dean
|
||||
|
||||
To ensure that kubernetes is correctly installed and configured,
|
||||
:ref:`kubernetes`.
|
||||
|
||||
We have validated these steps against the following software package versions
|
||||
We have validated these steps against the following software package
|
||||
versions:
|
||||
|
||||
* |CL| 26240--lowest version permissible.
|
||||
* Docker 18.06.1
|
||||
* Kubernetes 1.11.3
|
||||
* Go 1.11.12
|
||||
|
||||
The Intel® Deep Learning Stack is available in two versions. First, a
|
||||
version that includes TensorFlow* optimized for Intel Architecture, the
|
||||
`Eigen`_ version. Second, there is a version that includes the TensorFlow*
|
||||
framework optimized using Intel® Math Kernel Library for Deep Neural
|
||||
Networks (Intel® MKL-DNN) primitives, the `Intel MKL`_ version.
|
||||
|
||||
TensorFlow* Single and Multi Node Benchmarks
|
||||
TensorFlow single and multi-node benchmarks
|
||||
============================================
|
||||
|
||||
This section describes running the `TensorFlow benchmarks`_ in single node.
|
||||
For multi node testing replicate these steps for each node. These steps
|
||||
provide a template to run other benchmarks, providing they can invoke
|
||||
For multi-node testing, replicate these steps for each node. These steps
|
||||
provide a template to run other benchmarks, provided that they can invoke
|
||||
TensorFlow.
|
||||
|
||||
Download and run either the `Eigen`_ or the `Intel MKL-DNN`_ docker image
|
||||
from hub.docker.com. The next commands will take place in the running
|
||||
container. Replace <docker_name> with the name of the image.
|
||||
#. Download and run either the `Eigen`_ or the `Intel MKL-DNN`_ docker image
|
||||
from `Docker Hub`_.
|
||||
|
||||
.. note::
|
||||
|
||||
.. note::
|
||||
You will enter the following commands in the running container.
|
||||
|
||||
Replace <docker_name> with the name of the image.
|
||||
Replace <docker_name> with the name of the image.
|
||||
|
||||
#. First, clone the benchmark repository:
|
||||
#. Clone the benchmark repository:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
docker exec -t <docker_name> bash -c ‘git clone http://github.com/tensorflow/benchmarks -b cnn_tf_v1.11_compatible’
|
||||
|
||||
#. Next, execute the benchmark script to run the benchmark
|
||||
#. Next, execute the benchmark script to run the benchmark.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -84,11 +90,11 @@ container. Replace <docker_name> with the name of the image.
|
||||
You can replace the model with one of your choice supported by the
|
||||
TensorFlow benchmarks.
|
||||
|
||||
Kubeflow Multinode benchmarks
|
||||
Kubeflow multi-node benchmarks
|
||||
=============================
|
||||
|
||||
The benchmark workload will run in a Kubernetes container. We will use
|
||||
Kubeflow and deploy three nodes for this tutorial to show resource
|
||||
`Kubeflow`_ and deploy three nodes for this tutorial to show resource
|
||||
management and get sufficient output data for evaluation.
|
||||
|
||||
Kubernetes setup
|
||||
@@ -103,7 +109,7 @@ Follow the instructions in the :ref:`kubernetes` tutorial to get set up on
|
||||
Kubernetes networking
|
||||
*********************
|
||||
|
||||
We have used `flannel`_ as the network provider for these tests. If you are
|
||||
We used `flannel`_ as the network provider for these tests. If you are
|
||||
comfortable with another network layer, refer to the Kubernetes
|
||||
`networking documentation`_ for setup.
|
||||
|
||||
@@ -111,9 +117,9 @@ comfortable with another network layer, refer to the Kubernetes
|
||||
Images
|
||||
******
|
||||
|
||||
We need to add `launcher.py` to our docker image to
|
||||
include the Intel® Deep Learning Stack, and put the benchmarks repo in the
|
||||
right location. From the docker image, run the following:
|
||||
We need to add `launcher.py` to our docker image to include the Intel® Deep
|
||||
Learning Stack and put the benchmarks repo in the correct location. From the
|
||||
docker image, run the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -125,12 +131,12 @@ right location. From the docker image, run the following:
|
||||
Your entry point now becomes "/opt/launcher.py".
|
||||
|
||||
This will build an image which can be consumed directly by TFJob from
|
||||
kubeflow. We are working to create these images as part of our release
|
||||
kubeflow. We are working to create these images as part of our release
|
||||
cycle.
|
||||
|
||||
|
||||
ksonnet*
|
||||
********
|
||||
ksonnet\*
|
||||
*********
|
||||
|
||||
Kubeflow uses ksonnet* to manage deployments, so we need to install that before setting up Kubeflow. On |CL|, follow these steps:
|
||||
|
||||
@@ -149,7 +155,7 @@ accessible across the environment.
|
||||
Kubeflow
|
||||
********
|
||||
|
||||
Once you have Kubernetes running on your nodes, you can setup Kubeflow by following these instructions from their `quick start guide`_.
|
||||
Once you have Kubernetes running on your nodes, you can setup `Kubeflow`_ by following these instructions from their `quick start guide`_.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -212,8 +218,9 @@ benchmark results. More information about `Kubernetes logging`_ is available fro
|
||||
.. The downstream dockerfile will generate another image with benchmarks repo and launcher.py file in the right locations.
|
||||
.. Dynamic generation of ksonnet template files for a matrix of batch_size, model and replicas.
|
||||
|
||||
|
||||
|
||||
.. TensorFlow: https://www.tensorflow.org/
|
||||
.. _Kubeflow: https://www.kubeflow.org/
|
||||
.. _Docker Hub: https://hub.docker.com/
|
||||
.. _TensorFlow benchmarks: https://www.tensorflow.org/guide/performance/benchmarks
|
||||
.. _instructions for creating a cluster: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
|
||||
.. _flannel: https://github.com/coreos/flannel
|
||||
|
||||
Reference in New Issue
Block a user