Create a Docker file that compiles the Tensorflow binary for use: SSE4.1, SSE4.2, and AVX instructions

So, one of the components of docker is to easily deploy a software testing environment, right? Can anyone tell me how to compile the Tensorflow binary to use: SSE4.1, SSE4.2 in a Docker file ?. Can anyone point me to a Docker file that does this? if at all possible?

As a result, two questions:

  • Is it possible to have a Docker file that compiles the Tensorflow binary for use: SSE4.1, SSE4.2 (and GPU, I found only one or the other)
  • Can you tell me where I can find a Docker file that does this, or a good tutorial?

"The purpose of this question is to avoid the following scenario: where the host configuration works, but the docker configuration does not work because Tensorflow has not been compiled in a certain way." Like in the picture below.enter image description here

+8
source share
2 answers

A working example of such a Dockerfile, which can be used as a starting point, is given here: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/docker (see details README.md).

More precisely, this is a set of parameterized Docker files, assembly begins with parameterized_docker_build.sh. An example of a command that successfully compiles TensorFlow inside Docker:

export TF_DOCKER_BUILD_IS_DEVEL=YES
export TF_DOCKER_BUILD_TYPE=CPU
export TF_DOCKER_BUILD_PYTHON_VERSION=PYTHON3
export TF_DOCKER_BUILD_DEVEL_BRANCH=master
tensorflow/tools/docker/parameterized_docker_build.sh

TensorFlow TF_DOCKER_BUILD_IS_DEVEL=YES Docker - Docker .

TensorFlow Docker AVX.

SSE . bazel https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel.

PS. TensorFlow - https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/ci_build.

+3

? AVX ... , Docekrfile Tensorflow

-1

Source: https://habr.com/ru/post/1692881/


All Articles