Riallto Ubuntu 24.04 setup#

Currently there is support for bringing up Riallto on Ubuntu 24.04 with docker. To use Riallto on Linux requires the use of the xdna-driver which is installed as part of the setup. This driver requires version 6.10+ of the Linux kernel, these scripts will upgrade a standard Ubuntu 24.04 installation to this kernel version. Using this kernel version will require disabling secure boot on your device.

Install steps#

On an NPU enabled laptop running Ubuntu 24.04.

  1. Setup Docker.

You can follow the steps here.

  1. Add your user to the docker user group and then relogin.

    sudo usermod -aG docker $USER ; exit
    
  2. Obtain a license file for Riallto.

    Please follow the guide here to get the license.

  3. Disable secure boot from your BIOS settings.

    For now we are using an unsigned kernel version requiring that secure boot is disabled before it can be used. To disable secure boot there is a guide from Microsoft here, but often the steps depend on your hardware manufacturer.

  4. Clone the Riallto repository and then navigate to the installation script.

    git clone https://github.com/AMDResearch/Riallto.git -b v1.1
    cd Riallto/scripts/linux/
    

    Note

    We recommend using the tag v1.1 to get the verified version of Riallto. Install from main to get the latest drivers and code, however, this is not thoroughly verified.

  5. Upgrade Linux Kernel.

    ./setup_riallto_linux.sh <your license file> <username (optional)>
    

    This command will check the kernel version and if the xdna-driver has been installed. If the Linux kernel is not 6.10 or the NPU device drivers are missing, it will build them within a docker and install them on the host machine. This takes about 10 minutes to run and after completing successfully the user will be asked to restart.

  6. Reboot the machine.

    This will finish upgrading the Linux kernel to 6.10.

  7. Install Riallto by creating its Docker container.

    ./setup_riallto_linux.sh <your license file> <username (optional)>
    

    This will build the Riallto Docker and will take about 20 minutes.

    Note

    You can specify a username to indicate the ownership of the files created inside the Docker container. If no username is specified, the default username is $USER.

Running Tests#

Verify the correct installation of Riallto. Inside the Riallto/scripts/linux directory, you will find the run_pytest.sh script.

./run_pytest.sh

This script will run a suit of tests using pytest to verify the operation of your NPU device and the Riallto installation. This will take about 50 minutes.

Running Riallto#

Launch a Jupyterlab server from a Docker container allowing you to use Riallto notebooks from the provided directory (usually Riallto/notebooks). Inside the Riallto/scripts/linux directory, you will find the launch_jupyter.sh script.

./launch_jupyter.sh ../../notebooks

Running from different users#

Once the Riallto Docker container is created for one user, other users can run Riallto without having to re install. Other users do not need elevated privileges, but they need to be part of the docker group.

  1. Make sure user is in the docker group.

    sudo usermod -aG docker <user> ; exit
    
  2. Clone the Riallto repository and then navigate to the Linux scripts directory.

    git clone https://github.com/AMDResearch/Riallto.git -b v1.1
    cd Riallto/scripts/linux/
    
  3. Launch a Jupyterlab server using Riallto notebooks.

    ./launch_jupyter.sh ../../notebooks
    

FAQ#

If you get the following error on boot, error: bad shim signature#

This means that secure boot has not been disabled from the machine and it cannot run the necessary kernel version.

If the Docker container does not start with launch_jupyter.sh or run_pytest.sh because of the /dev/accel/accel0 does not exist#

Check dmesg

sudo dmesg | grep "xdna"

If you see loading /lib/firmware/amdnpu/1502_00/npu.sbin failed with error -22, it means that the driver did not install properly.

Delete the NPU firmware:

sudo rm -rf /lib/firmware/amdnpu/

Then, start the installation from scratch.