Some docker files of tensorflow I use and maybe they are useful to others as well.
I am a novice docker user so this image may not follow the best practices. Any input is welcome. This is work in progress.
Tensorflow on Docker with ability to forward xterm output to a MacOS terminal effectivelly giving the ability to view graphics (e.g. matplot). You can either
You can either "Build from Source" or Pull the image from DockerHub.
Instructions on how to allow docker to forward terminal can be found here:
How to build:
- Download 1.12.0.cpu-py3-gui.Dockerfile from the repository
- Using terminal navigate to the directory you downloaded the 1.12.0.cpu-py3-gui.Dockerfile
docker build -f 1.12.0.cpu-py3-gui.Dockerfile -t youruser/tensorflow:1.12.0-py3-gui .
Now you have the image. You can run it with the following command (it is important to follow the instructions in the stackoverflow link above, in order to be able to forward GUI commands to the host macOS)
Execute the following to pull the image:
docker pull cyrus1313/tensorflow:1.12.0-cpu-py3-gui
How to run the image:
docker run -e DISPLAY=$IP:0 -it youruser/tensorflow:1.12.0-py3-gui bash
Tensorflow on Docker with Python 3.7 (not officially supported by Tensorflow yet, but it works fine with some experiments I am using).
You can either ["Build from Source"] or Pull the image from DockerHub.
How to build:
- Download 1.13.1.cpu-py3.7.Dockerfile from the repository
- Using terminal navigate to the directory you downloaded the 1.13.1.cpu-py3.7.Dockerfile
docker build -f 1.13.1.cpu-py3.7.Dockerfile -t youruser/tensorflow:1.13.1.cpu-py3.7 .
Execute the following to pull the image:
docker pull cyrus1313/tensorflow:1.13.1-cpu-py3.7
How to run the image:
docker run -it youruser/tensorflow:1.13.1-py3.7