I don&#x27;t understand why you need to do that, tensorflow is already dockerized for GPUs, using the nvidia-docker images:
<a href="https:&#x2F;&#x2F;github.com&#x2F;tensorflow&#x2F;tensorflow&#x2F;tree&#x2F;master&#x2F;tensorflow&#x2F;tools&#x2F;docker" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tensorflow&#x2F;tensorflow&#x2F;tree&#x2F;master&#x2F;tensorf...</a>