docker run -it -w /tensorflow -v $PWD:/mnt -e HOST_PERMS="$(id -u):$(id -g)" \
tensorflow/tensorflow:nightly-devel bash
git pull # within the container, download the latest source code
./configure
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2 -k //tensorflow/tools/pip_package:build_pip_package --local_resources 2048,.5,1.0
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /mnt # create package
pip install /mnt/tensorflow-version-tags.whl