# "No space left on device" when using model.push\_to\_hub()

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-space-left-on-device-when-using-model-push-to-hub%2F88941%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 28, 2024, 9:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-space-left-on-device-when-using-model-push-to-hub%2F88941 "2024-05-28T09:27:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anhnh2002](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/anhnh2002/32/27497_2.png) [@anhnh2002](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanhnh2002)%5C
**Post date:** [May 28, 2024, 9:27am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-space-left-on-device-when-using-model-push-to-hub%2F88941%2F1 "2024-05-28T09:27:41Z")

</div>

![Screenshot 2024-05-28 at 16.27.31](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/b/eba94c86e96f29a98679ebaf4b298829079805f8.png)

---

<div class="post-metadata">

**Author:** ![juhoinkinen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/juhoinkinen/32/32436_2.png) [@juhoinkinen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjuhoinkinen)%5C
**Post date:** [May 28, 2024, 8:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fno-space-left-on-device-when-using-model-push-to-hub%2F88941%2F2 "2024-05-28T20:26:46Z")

</div>

Maybe `push_to_hub()` is writing some temporary file(s) to `/tmp`, which runs out of space?

Try changing the location for the temporary files by putting `TMPDIR=/mnt/tmp` in front of the command you are running (it seemed that you are working in /mnt, which has much space, but some other location could be better for the temp files). See [TMPDIR - Wikipedia](https://en.wikipedia.org/wiki/TMPDIR)

Edit: Or actually is the partition that is used by HFH cache filling up? In that case it could be relocated with `HF_HOME` or `HF_HUB_CACHE` envs: [Manage huggingface\_hub cache-system](https://huggingface.co/docs/huggingface_hub/main/guides/manage-cache#understand-caching)
