xla icon indicating copy to clipboard operation
xla copied to clipboard

[WIP] Significantly reduce Docker image size

Open will-cromar opened this issue 2 years ago • 0 comments

This PR brings the size of the GPU image down to 6.24 GB from 17.2 GB

  • Use local xla directory instead of cloning from github. This allows building an image from a local working copy
  • Separate build image from release image so we don't release build artifacts
  • Break build steps up to take better advantage of caching to make debugging less painful. In particular, build TF in its own step because it takes forever
  • Remove unnecessary dependencies
  • Use smaller python:X.Y-slim base images

TODO:

  • [ ] Add torchvision
  • [ ] Add shallow clone of tests, example models, etc
  • [ ] Add support for patches
  • [ ] Update this branch and test again

Needs follow-up:

  • Create new GCB config for this image
  • Collect wheels and upload to GCS
  • Start using in e2e tests

will-cromar avatar Sep 23 '22 20:09 will-cromar