PR #28017: Stream image build logs in dockerfile assembler system
PR #28017: Stream image build logs in dockerfile assembler system

Imported from GitHub PR #28017

This change enables streaming image build logs when using `assembler.py` by using the lower level docker APIClient and manually handling the returned log stream.

This change is useful for modifications on dockerfiles, since behavior can be inspected before a build is finished.

Copybara import of the project:

  - 536c8c4a546f46f95d85d52639439c110cb36fd1 Interactively show docker logs when building images by Max Zhao <alcasa.mz@gmail.com>
  - d2c627b8fe262dca7aee411ab7b26a100aff9c6b Fixing error logging for failed image builds by Max Zhao <alcasa.mz@gmail.com>
  - d00b9314902b1599b1db88655332cd765d27a4d4 Adding comments on code changes by Max Zhao <alcasa.mz@gmail.com>
  - 7bb9dd844e01aa2271e97916fafa7550a6778429 Merge d00b9314902b1599b1db88655332cd765d27a4d4 into 3ee29... by Max Zhao <alcasa.mz@gmail.com>

PiperOrigin-RevId: 245509154

sarvex/tensorflow,petewarden/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,annarev/tensorflow,chemelnucfin/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,gunan/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,arborh/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,annarev/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,alsrgv/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,sarvex/tensorflow,aam-at/tensorflow,ghchinoy/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,arborh/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ghchinoy/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,aldian/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,annarev/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,alsrgv/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,ghchinoy/tensorflow,alsrgv/tensorflow,alsrgv/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,Intel-tensorflow/tensorflow,sarvex/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,ppwwyyxx/tensorflow,Intel-Corporation/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,freedomtan/tensorflow,ghchinoy/tensorflow,frreiss/tensorflow-fred,chemelnucfin/tensorflow,chemelnucfin/tensorflow,xzturn/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,alsrgv/tensorflow,aam-at/tensorflow,aldian/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,arborh/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,aam-at/tensorflow,aam-at/tensorflow,gunan/tensorflow,aldian/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,aam-at/tensorflow,petewarden/tensorflow,alsrgv/tensorflow,Intel-Corporation/tensorflow,jhseu/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ppwwyyxx/tensorflow,DavidNorman/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,jhseu/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,arborh/tensorflow,renyi533/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,DavidNorman/tensorflow,Intel-tensorflow/tensorflow,alsrgv/tensorflow,gunan/tensorflow,karllessard/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ppwwyyxx/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,gunan/tensorflow,Intel-Corporation/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,adit-chandra/tensorflow,jhseu/tensorflow,Intel-Corporation/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,gunan/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,ghchinoy/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,jhseu/tensorflow,karllessard/tensorflow,xzturn/tensorflow,jhseu/tensorflow,davidzchen/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,arborh/tensorflow,alsrgv/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,xzturn/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,frreiss/tensorflow-fred,DavidNorman/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,gunan/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,aldian/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,chemelnucfin/tensorflow,aldian/tensorflow,ghchinoy/tensorflow,aldian/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,ghchinoy/tensorflow,petewarden/tensorflow,arborh/tensorflow,yongtang/tensorflow,ghchinoy/tensorflow,karllessard/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,adit-chandra/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,jhseu/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ghchinoy/tensorflow,gunan/tensorflow,annarev/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,annarev/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,aldian/tensorflow,tensorflow/tensorflow,gunan/tensorflow,xzturn/tensorflow,arborh/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,Intel-Corporation/tensorflow,aam-at/tensorflow,petewarden/tensorflow,renyi533/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow