title: How can I get `cos-extensions install gpu` to work on a Google Cloud VM?
body: <p>I'm trying to set up a container-optimized OS (COS) on GCE with a GPU, following the instructions at <a href="https://cloud.google.com/container-optimized-os/docs/how-to/run-gpus" rel="nofollow noreferrer">https://cloud.google.com/container-optimized-os/docs/how-to/run-gpus</a>. After creating the VM, it says to ssh in and run <code>cos-extensions install gpu</code>. That works; you can see during the install it runs <code>nvidia-smi</code> which prints out the driver version (440.33.01) and connects to the card.</p>
  <p>But it installs the nvidia bins and libs in <code>/var/lib/nvidia</code>, which is mounted as <code>noexec</code> in this OS (it's very locked down). That means none of the libs or utilities work. And when you mount them to a docker container, they don't work there either; they're still noexec.</p>
  <p>The only workaround I've found is to copy the whole <code>/var/lib/nvidia</code> dir to a tmpfs scratch disk and use it from there.
  Am I using it wrong, or is it just broken?</p>