project-lakitu: cos-extensions: provide additional volume from cos-extensions for cos-gpu-installer

cos_gpu_installer v2: toolchain preloading/ caching

Empirically it has been observed that a significant amount of GPU driver
installation time is taken up during downloading and installing the
toolchain. This toolchain is a function of the build number of the cos
build running on the host machine.

One solution to cutting down on the gpu driver installation at run time
is by caching the toolchain at preload time. This can be achieved by
using the cos-extensions interface as follows:

At preload time, run cos-extensions install gpu -- --use-build-tools-cache.
This populates the cache.
At preload time, run rm -rf /var/lib/nvidia
At runtime, run cos-extensions install gpu -- --use-build-tools-cache to
install drivers using the populated cache.

This flow is achieved by providing an additional volume
/var/lib/cos-extensions -> /build from cos-extensions when invoking
cos-gpu-installer. /build is where the installer stores the toolchain
and it checks for the presence of the toolchain before downloading.

RELEASE_NOTE=Added the --use-build-tools-cache flag to `cos-extensions install gpu`.

Change-Id: I958fe6d259362a2ec33f5ba8e47b72fe3efc10c6
Reviewed-by: Roy Yang <>
Tested-by: Arnav Kansal <>
2 files changed