Some libraries such as BLAS/LAPACK or certain optimisation libraries get optimised for the local machine architecture upon compilation time. Lets take OpenBlas as an example. There exist two ways to create a Docker container with OpenBlas:
Use a Dockerfile in which you specify a git clone of the OpenBlas library together with all necessary compilation flags and build commands.
Pull and run someone else's image of Ubuntu + OpenBlas from the Docker Hub.
Option (1) guarantees that OpenBlas is build and optimised for your machine. What about option (2)? As a Docker novice, I see images as something fixed and static, so running this image would not be optimised to my machine (which might be AMD-based instead of the maintainer's Intel CPU). What left me confused is that the image ipython/scipyserver does clone the latest OpenBlas master from Github during build.
I seem to misunderstand the concept of Docker images and/or automated builds, and I would very much appreciate a clarification.