cos-tools: Regression issue for cos_gpu_installer - possible impact for user who disable network but has cached GPU drivers

Detailed description:
The root cause of this issue is that the GCS client inits at very beginning of the installer execution. This will cause the regression issue for users have cached GPU driver and use `cos-gpu-installer` with a pinned version of the installation and disabled the network.


Implementation explanation:
Lazily initialize the GCSClient within the GCSDownloader type - this is to make sure the GCSClient will only be created when necessary.

BUG=b/325342239
RELEASE_NOTE= None

TEST=test GPU driver installation with this version of gpu-installer in vm.

Change-Id: I4c95218c17602d7868ce806ceefb6b141ce6e496
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/65230
Tested-by: Shuo Yang <gshuoy@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Reviewed-by: Arnav Kansal <rnv@google.com>
3 files changed
tree: 24887775df71189a6a7e01071810aebf91a5b5dc
  1. coverage/
  2. release/
  3. src/
  4. testing/
  5. .gitignore
  6. BUILD.bazel
  7. cloudbuild.yaml
  8. CONTRIBUTING.md
  9. deps.bzl
  10. go.mod
  11. go.sum
  12. LICENSE
  13. postsubmit-cloudbuild.yaml
  14. README.md
  15. run_tests.sh
  16. run_unit_tests.sh
  17. 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.