Try it out, it should download the MNIST dataset (if not already on your system) and then display some output about the training process. We will not take a look at the source code, you will understand it if you are familiar with Tensorflow. Instead, we will understand the Docker framework.
The first important part is the docker-compose.yml.
=== docker-compose.yml ===
Together with the comments, it should be pretty much self-explanatory. In summary, this docker-compose is going to build a new container, tag it with a specific name, and then run it on our system, using a pre-configured entrypoint (i.e. a command which will be executed after container creation).
<syntaxhighlight lang="yaml">
#
image: ccu.uni-konstanz.de:5000/<your.username>/tf_mnist:0.1
# The container needs the nvidia container runtime.
# Environment variables set when running the image,
# which can for example used to configure the nVidia base
# container or your application. You can use these to # configure your own code as well.
#
environment: