title: How do I override the use of /tmp when building with Bazel?
body: <p>I am building a <a href="https://www.tensorflow.org/" rel="noreferrer">large Bazel project</a> in a cloud VM with <code>/tmp</code> in a small filesystem (~8 GB). Occasionally my build fails with the error <code>Not all outputs were created</code>: the filesystem containing <code>/tmp</code> is at 99% of capacity, and <code>/tmp</code> contains many Bazel build artifacts.</p>
  
  <p>How can I override the temporary directory that Bazel uses? I tried setting the <code>TEMP</code> and <code>TMPDIR</code> environment variables when starting <code>bazel build</code>, but this did not help.</p>