Resolved: Error building tensorflow from source in docker container

I followed all the instructions in this page but encountered two errors.

Running with verbose mode gives more information on the errors, i.e.:

bazel build -c opt //tensorflow/cc:tutorials_example_trainer --verbose_failures

The first was permission denied:

mount("none", "/", NULL, MS_REC | MS_PRIVATE, NULL): Permission denied

The solution is to run the docker container with the –privileged flag. I am not sure exactly which privileged is needed.

Ran again and encountered the second error. It requires zlib which I have not installed in my image.

apt-get install zlib1g-dev

Afterwards I am able to finish compiling.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s