Bare Metal Installation

Note

  • Installing dependencies requires sudo permission.

  • Verify that PyTorch is already installed in the path listed in the PYTHONPATH environment variable. If it is, uninstall it before proceeding or remove the path from the PYTHONPATH.

Install Intel Gaudi PyTorch

Install the Intel Gaudi PyTorch environment. For the full list of the packages included, refer to Intel Gaudi PyTorch Packages.

./habanalabs-installer.sh install -t dependencies
./habanalabs-installer.sh install --type pytorch

The Intel Gaudi PyTorch package is installed in $HOME/.local/lib/{PYTHON_VER}/site-packages.

Install Intel Gaudi PyTorch in a Virtual Environment

  1. Install PyTorch inside the virtual environment by adding the --venv flag:

    ./habanalabs-installer.sh install -t dependencies
    ./habanalabs-installer.sh install --type pytorch --venv
    

    The default virtual environment folder is $HOME/habanalabs-venv. You can override the default by using export HABANALABS_VIRTUAL_DIR=xxxx.

  2. To activate the virtual environment, go to the directory where your virtual environment is installed and run source ./bin/activate command.

  3. Set the GC_KERNEL_PATH environment variable to the default path of the TPC kernels library to ensure seamless training:

    export GC_KERNEL_PATH=/usr/lib/habanalabs/libtpc_kernels.so