There have been updates to this since the first version to support later versions of TensorFlow

This post describes how I create the TensorFlow virtual machine for my class T81-558: Applications of Deep Learning. This installs a basic Python (Anaconda) and TensorFlow VM to use Jupyter notebook from.

  • Download latest version of Ubuntu Desktop - link
  • Install Ubuntu in a VM
    • Filename: t81-558-ubuntu-tensorflow-v1
    • Display Name: T81-558-Deep-Learning
  • Remove several unused icons from the left launcher (e.g. Amazon, Word Processor, Spreadsheet, floppy disk (seriously?).
  • Create a terminal quick launch. - Click top icon (search your computer), type “terminal”, launch terminal, right-click terminal icon and “Lock to Launcher”.
  • Install VMWare Tools
    • Selection from “Virtual Machine” menu “Reinstall VMWare Tools”.
    • Double click GZ file inside of newly mounted virtual DVD
    • Drag “vmware-tools-distrib” to desktop.
    • From the terminal:
cd Desktop/vmware-tools-distrib/
sudo ./vmware-install.pl
* Accept all default options
* Restart:
shutdown -r 0
  • Login back in
  • Delete vmware tools from desktop
  • Update Ubuntu, from the terminal:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • Fix Ubuntu VI cursor keys:
    • add set nocompatible to:
pico ~/.vimrc
  • Install Git, from the terminal:
sudo apt-get install git
  • Download Anaconda Python 3.x 64-bit for Linux - link
  • From a terminal, determine the filename of the Anaconda installer:
ls ~/Downloads/
  • Run the installer (your filename may be a later version):
chmod +x ~/Downloads/Anaconda3-4.1.1-Linux-x86_64.sh
~/Downloads/Anaconda3-4.1.1-Linux-x86_64.sh
  • Accept all defaults, except answer yes the last:
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/student/.bashrc ? [yes|no]
[no] >>> yes
  • Exit terminal and reopen
  • Create Tensorflow and Update Environment
conda create -n tensorflow python=3.4
source activate tensorflow
conda install pandas
conda install scikit-learn
conda install matplotlib
conda install jupyter
  • Install TensorFlow 0.12.1 - The version we are using in class.
pip install tensorflow==0.12.1
  • Clone the class source code:
git clone https://github.com/jeffheaton/t81_558_deep_learning.git
  • Add this line at the end of .bashrc:
pico /home/student/.bashrc

The following lines:

source activate tensorflow
echo "To start Jupyter, enter the command:    ./go.sh"
  • Create the file go.sh, using the command: pico /home/student/go.sh:
cd /home/student/t81_558_deep_learning
jupyter notebook
  • Give “go” permission to run:
chmod +x ./go.sh

Please note that I’ve switched to using a docker image for this setup. You can find the docker image at the following URL: