Deep Learning - Udacity Course: How to get the assignment infrastructure running

When I started Udacity's course on Deep Learning I was a little bit lost how to get the infrastructure installed for doing the assignments. So here are some notes on how to do this, if you face similar problems:

At the time of writing these notes, TensorFlow is only supported for Linux and Mac OS X. Support for Windows is planned, but not yet provided. So if you want to do the assignments using Windows (Windows 10 Pro in my case), you can use a so called Docker container. According to Docker's webpage:

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

Udacity provides such a Docker container for the Deep Learning course that contains everything you need to do the assignments. The assignments will be done in a webbrowser software called "Jupyter Notebook". Jupyter allows to display text and Python code that can directly be executed from the webfrontend.

So three things have to be done to be able to do the TensorFlow assignments:

  • Install Docker
  • Download and run the Docker container provided for the Udacity Course
  • Open the Jupyter frontend to select and start an assignment

1. Installing Docker

Download and install Docker.

2. Download and start the Docker container for the Udacity course:

According to the documentation here, open a command-shell and type in:
		docker run -p 8888:8888 --name tensorflow-udacity -it b.gcr.io/tensorflow-udacity/assignments:0.5.0

In the case it was downloaded before, you can instead just restart the Docker container with:

		docker start -ai tensorflow-udacity
		

3. Open the Jupyter frontend and select an assignment:

Open the adress http://127.0.0.1:8888 in your web browser:

Once you have selected one of the course assignments, a new page will open, that shows the text and Python code:

Selecting a Python code snippet and pressing the START button will allow you to execute the selected code snippet in the Docker container and see the output produced by it directly below the code snippet.

Additional notes (VMWare vs. Docker/Jupyter):

After using this Docker+Jupyter approach to do the assignments and learn TensorFlow, I installed TensorFlow directly on an Ubuntu system running in a VMWare and wanted to use TensorFlow directly. But then I got this error when trying to start VMWare:

VMWare Player and Hyper-V are not compatible. Remove the Hyper-V role from the system before running VMWare Player.

For deactivating the Hyper-V role enter the following in a command shell:

		bcdedit /set hypervisorlaunchtype off
		

Then restart the computer! After the restart, Docker (that automatically starts) asks to re-activate Hyper-V. So press the "Quit" button. Now you can work again with VMWare.

For re-activating Hyper-V, use:

		bcdedit /set hypervisorlaunchtype auto
		
and restart the computer.