Thursday, February 27, 2025

Troubleshooting Disk Quota Exceeded Error While Installing Triton from Source

 If you've encountered the [Errno 122] Disk quota exceeded error while installing the Triton Python package from source, you're not alone. This error typically indicates that your home directory has run out of disk space. In this post, we'll walk through the root cause of this issue and how to resolve it.

Understanding the Error

The error message [Errno 122] Disk quota exceeded is a clear indication that the disk space allocated to your home directory is insufficient. This can happen during the installation process of Triton, especially when it tries to extract LLVM into the ~/.triton directory.

Root Cause

The Triton build process uses the ~/.triton directory to extract LLVM, which can consume a significant amount of disk space. If your home directory has limited space, this can lead to the disk quota being exceeded.

Steps to Resolve

  1. Check Disk Usage: First, check the current disk usage of your home directory to confirm that it is indeed full.

    du -sh ~
    
  2. Free Up Space: If your home directory is full, you can free up space by deleting unnecessary files or moving them to another location.

    rm -rf ~/unnecessary-file-or-directory
    
    #Another way is you can create symlink to tmp if you homedirectory does not have enough diskspace
    mkdir /tmp/triton_tmp
    ln -s /tmp/triton_tmp ~/.triton
  3. Change Extraction Directory: You can change the directory where Triton extracts LLVM to a location with more available space. Set the TRITON_CACHE_DIR environment variable to a directory with sufficient space.

    export TRITON_CACHE_DIR=/path/to/large/directory
    
  4. Re-run Installation: After freeing up space or changing the extraction directory, try running the installation process again.

    pip install -e .
    
    # URL: https://github.com/triton-lang/triton/blob/main/docs/getting-started/installation.rst

No comments: