We recommend training with Colab since you won't have to deal with Docker management. That said, it is possible to docker-ize training

We need to be able to run a specific version/commit of TensorFlow and the dependancy requirements for TF are very extreme. We strongly suggest against trying to compile and run on your native computer OS - that way we don't get weird interactions with your OS, compiler toolchain, Python kit, etc. Also, TF really wants to run on a particular version of Linux and chances are you aren't running it.

Instead, we will be using Docker to containerize and separate the TF build so we have a compact, clean, dependable build. Docker is lighter than VMWare/vagrant, and has a very nice 'hub' backend for saving/restoring your images, all for free!

Signup and log into Docker

Sign up at https://hub.docker.com/signup

 

You don't need to pay for an account, but be aware the software images we'll be using are public so don't put any private data in em!

Download and Install Desktop Docker

Download Docker software for Windows or Mac, whichever matches your computer

TensorFlow needs a lot of computing resources

Give it as many CPUs and as much RAM as you can spare

You need to give it at least 8 GB of RAM or gcc will fail with a very annoying and somewhat confusing error like this (but on some other file)

ERROR: /root/tensorflow/tensorflow/core/kernels/BUILD:3371:1: C++ compilation of rule '//tensorflow/core/kernels:reduction_ops' failed (Exit 4)
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
Target //tensorflow/examples/speech_commands:train failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6058.951s, Critical Path: 3278.24s
INFO: 2606 processes: 2606 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Open a command terminal and try to login, use the same username/password as from the site

OK you're ready to go!

This guide was first published on Jul 17, 2019. It was last updated on Mar 08, 2024.

This page (Install Docker) was last updated on Mar 08, 2024.

Text editor powered by tinymce.