cos_customizer: Adding a scratch disk for the install-gpu step

This change modifies the preloader and provisioner to take advantage of a "scratch disk"
during the install gpu step. The install gpu step requires a toolchain of 5gb which
gets installed onto the bootdisk, and subsequently customers are forced to increase their bootdisk size.
This change now downloads the gpu toolchain to a "scratch disk" which is only created when the install-gpu
step is configured. The scratch disk is created by the preloader and the provisioner takes advantage of
the disk by mounting the disk and using it as the new toolchain location. This reduces cos-gpu image sizes by around
4-5gb depending on the size of the toolchain.

BUG=b/240175057,b/172925856
TEST=presubmit

Change-Id: I556bdc25327274e13e2947ff7a5bfffde2c18c04
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/35847
Tested-by: Nobel Barakat <nobelbarakat@google.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
7 files changed
tree: c592c911b1c0d2eb6950128f33dfcd4feb7e74f0
  1. release/
  2. src/
  3. testing/
  4. .gitignore
  5. BUILD.bazel
  6. cloudbuild.yaml
  7. CONTRIBUTING.md
  8. deps.bzl
  9. go.mod
  10. go.sum
  11. LICENSE
  12. README.md
  13. run_tests.sh
  14. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.