Skip to content

Latest commit

 

History

History
76 lines (41 loc) · 2.72 KB

INSTALL.md

File metadata and controls

76 lines (41 loc) · 2.72 KB

Installation

We suggest installing the necessary libraries locally on your laptop as described below in "Local Installation", as that will let you run TensorBoard as part of the workshop, and let you run python scripts as well as notebooks.

But if you have trouble with your installation, you will be able to run everything but TensorBoard in Colab notebooks instead.

Local Installation

It's highly recommended to use a Python virtual environment for this workshop, either Virtualenv or Conda. Either Python 2.7 or Python 3 will work.

Then install the following into your virtual environment:

  • Install TensorFlow. Your TensorFlow version must be >=1.7 to run all the labs. Note that even if you're running a conda virtual environment, use pip install tensorflow to install TensorFlow (not the conda install version, which may not be up to date.)

  • Install Jupyter.

  • Optionally, install matplotlib. (If you're using a conda virtual environment, use conda install matplotlib.)

Test your installation

Start up a jupyter notebooks server from the command line:

jupyter notebook .

Create a new notebook and paste the following python code into a notebook cell:

import tensorflow as tf

print(tf.__version__)

'Run' the cell. Ensure that there are no import errors and that the TensorFlow version is as expected.

Using Colaboratory

Instead of running in a local installation, all of the jupyter notebooks in this workshop can also be run on Colab, with the exception of the lab sections that use TensorBoard.

The lab section READMEs include links to launch the workshop notebooks in colab.

Google Cloud Platform

Some of the labs include instructions for optionally running training and prediction on Google Cloud Platform (GCP) Cloud ML Engine.

If you want to play along, set up a GCP account: click the Try it free button at the top of this page: cloud.google.com.

Docker image

A Docker image is also available.

Download the container image

Once Docker is installed and running, download the workshop image:

docker pull gcr.io/google-samples/tf-workshop:v8

Here's the Dockerfile used to build this image.

Run the container

Once you've downloaded the container image, run it like this:

docker run -it \
    -p 6006:6006 -p 8888:8888 -p 5000:5000 gcr.io/google-samples/tf-workshop:v8