Heaton Research

Creating a VMWare Tensorflow VM for my Deep Learning Class

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:
1
2
cd Desktop/vmware-tools-distrib/
sudo ./vmware-install.pl
* Accept all default options
* Restart:
1
shutdown -r 0
  • Login back in
  • Delete vmware tools from desktop
  • Update Ubuntu, from the terminal:
1
2
3
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • Fix Ubuntu VI cursor keys:
    • add
      nocompatible``` to:
      1
      2

pico ~/.vimrc

1
2
* Install Git, from the terminal:

sudo apt-get install git

1
2
3
* Download Anaconda Python 3.x 64-bit for Linux - [link](https://www.continuum.io/downloads#linux)
* From a terminal, determine the filename of the Anaconda installer:

ls ~/Downloads/

1
2
* 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

1
2
* 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

1
2
3
* 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

1
2
* Install TensorFlow 0.12.1 - The version we are using in class.

pip install tensorflow==0.12.1

1
2
* Clone the class source code:

git clone https://github.com/jeffheaton/t81_558_deep_learning.git

1
2
* Add this line at the end of .bashrc:

pico /home/student/.bashrc

1
2
The following lines:

source activate tensorflow
echo “To start Jupyter, enter the command: ./go.sh”

1
2
* Create the file go.sh, using the command: ```pico /home/student/go.sh```:

cd /home/student/t81_558_deep_learning
jupyter notebook

1
2
* 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: