StackPointers

Be Coded….

Python

Installing TensorFlow using Dockers

Installing with Docker

Follow these steps to install TensorFlow through Docker.

  1. Install Docker on your machine as described in the Docker documentation.
  2. Launch a Docker container that contains one of the TensorFlow binary images.

The remainder of this section explains how to launch a Docker container.

To launch a Docker container that holds the TensorFlow binary image, enter a command of the following format:

where:

  • -p hostPort:containerPort is optional. If you’d like to run TensorFlow programs from the shell, omit this option. If you’d like to run TensorFlow programs from Jupyter notebook, set both hostPort and containerPort to 8888. If you’d like to run TensorBoard inside the container, add a second -p flag, setting both hostPort and containerPort to 6006.
  • TensorFlowImage is required. It identifies the Docker container. You must specify one of the following values:
    • gcr.io/tensorflow/tensorflow: TensorFlow binary image.
    • gcr.io/tensorflow/tensorflow:latest-devel: TensorFlow Binary image plus source code.

gcr.io is the Google Container Registry. Note that some TensorFlow images are also available at dockerhub.

For example, the following command launches a TensorFlow CPU binary image in a Docker container from which you can run TensorFlow programs in a shell:

The following command also launches a TensorFlow CPU binary image in a Docker container. However, in this Docker container, you can run TensorFlow programs in a Jupyter notebook:

Docker will download the TensorFlow binary image the first time you launch it.

Next Steps

You should now validate your installation.

Comments are Closed

Theme by Anders Norén