Deploy Intel® Optimization for TensorFlow Using Google Cloud Platform* Service

ID 729805
Updated 4/20/2022
Version Latest
Public

author-image

By

Intel® Optimization for TensorFlow* is a ready-to-run optimized solution that uses oneAPI Deep Neural Network Library (oneDNN) primitives. This solution works with Intel® Advanced Vector Extensions instructions on 3rd generation Intel® Xeon® Scalable processors (formerly code named Ice Lake) for performance improvement. 

This quick start guide provides instructions for deploying Intel Optimization for TensorFlow to Docker* containers. The containers are packaged by Bitnami on Microsoft Azure* for the Intel® processors.

What's Included

Intel Optimization for TensorFlow includes the following precompiled binaries:

Intel®-Optimized Library Minimum Version
oneDNN 2.5

Prerequisites

  • Google* account with access to the Google Cloud Platform* service. For more information, see Get Started.
  • 3rd generation Intel Xeon Scalable processor
  • oneDNN (included in this package)

Deploy Intel Optimization for TensorFlow

  1. To launch a Linux* virtual machine (VM) that's running on Ubuntu* 20.04 LTS:
    Note The minimum version of Ubuntu that Docker supports Ubuntu Bionic 18.04 (LTS). For more information on requirements, see: Install Docker Engine on Ubuntu.
    1. Go to the appropriate Google Cloud Platform service Marketplace page.
      Note This is an Ubuntu requirement for Docker.
    2. Select Create.

  2. To configure the VM on the Google Cloud Platform service:
    1. In Name, enter the name of the instance.
    2. In Region and Zone, enter the information for where the Intel Xeon Scalable processor is available:

      • us-central1-a, us-central1-b, us-central1-c
      • europe-west4-a, europe-west4-b, europe-west4-c
      • asia-southeast1-a, asia-souteast1-b


      For up-to-date information, see Regions and Zones.

    3. Select the machine type:
      • In Series, select N2. This instance provides the required hardware for the libraries included in the Intel Optimization for TensorFlow.
      • In Machine type, select an N2 instance. The machine types are N2-standard, N2-high-mem, and N2-high-cpu. They offer instance sizes between 2 to 128 vCPUs.
      • If you select a machine type ranging from 2 to 80 vCPUs, in CPU platform, select Intel Ice Lake or later.
      Tip For a recent list of supported processor platforms on Google Cloud*, see CPU Platforms.

    4. If needed, in Boot Disk, to update the instance to the TensorFlow requirements, select CHANGE.

    5. In the Identity and API access, Firewall, and NETWORKING, DISKS, SECURITY, MANAGEMENT, SOLE-TENANCY areas, update the information for your VM software needs.
    6. Select Create. This initiates the deployment process. After the deployment process finishes, you can view the new list of VM instances and basic information about it.

  3. To manage the VM resources and connection, do the following:
    1. Under Details, Network interfaces displays the External IP, and Storage displays the boot disk details.

    2. Select SSH, and then select Open in browser window. After the SSH connects to the VM in the browser-based terminal, you can deploy the Intel Optimization for TensorFlow for the Docker container image.

  4. To deploy Intel Optimization for TensorFlow on a Docker container:
    1. If needed, install Docker.
    2. To use the latest Intel Optimization for TensorFlow image, open a terminal window, and then enter this command: docker pull bitnami/tensorflow-intel:latest
      Note
      Intel recommends using the latest image. If needed, you can find all versions in the Docker Hub Registry.
    3. To test the Intel Optimization for TensorFlow, start the container with this command: docker run -it --name tensorflow-intel bitnami/tensorflow-intel
      Note tensorflow-intel
      is the container name for the bitnami/tensorflow-intel image.
      For more information on the docker run command (which starts a Python* session), see Docker Run.
      The container is now running.
    4. Import the Intel Optimization for TensorFlow into your program. The following image demonstrates commands you can use to import and use the TensorFlow API.

For more information about using TensorFlow and its API, see TensorFlow Introduction and TensorFlow API.

Note This deployment method may not always deploy on Intel Xeon Scalable processors as expected.

To verify that the instance is deployed:

  1. Go to your project's Compute Engines list.
  2. Select the instance you created. This displays the Instance Details page.
  3. Scroll to the Machine configuration section. The CPU Platform must display Intel Ice Lake. If another processor name appears, fix it with the Google Cloud Command Line Interface (gcloud CLI). 

Connect

To ask product experts at Intel questions, go to the Intel Collective at Stack Overflow, and then post your question with the intel-cloud tag.

For queries about the Intel Optimization for TensorFlow image on Docker Hub, see the Bitnami Community.

To file a Docker issue, in the Docker Hub, see the Issues section.

For more information, see:

N2 VMs with Intel Processors

Intel Optimization for TensorFlow Packaged by Bitnami