How do I reinstall Lambda Stack in Ubuntu on my Tensorbook?

To reinstall Lambda Stack in Ubuntu on a Tensorbook, run the following commands in a terminal:

  1. sudo rm -f /etc/apt/sources.list.d/{graphics,nvidia,cuda}* && \
    dpkg -l | \
    awk '/cuda|lib(accinj64|cu(blas|dart|dnn|fft|inj|pti|rand|solver|sparse)|magma|nccl|npp|nv[^p])|nv(idia|ml)|tensor(flow|board)|torch/ { print $2 }' | \
    sudo xargs -or apt -y remove --purge
    sudo apt -y update && sudo apt -y install lambda-stack-cuda lambda-tensorbook
    

    These commands, together:

    1. Remove existing apt sources that might conflict with the Lambda Stack apt source.
    2. Uninstall NVIDIA software and deep learning libraries that might conflict with Lambda Stack packages.
    3. Reinstall Lambda Stack.
  2. grep LINUX /etc/default/grub

    If the kernel boot options are already set correctly, this command will output the following:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX="button.lid_init_state=open i915.enable_fbc=0"
    #GRUB_DISABLE_LINUX_UUID=true
    

    If the kernel boot options are not already set correctly, run the following command:

    sudo sed -iE '/^GRUB_CMDLINE_LINUX=/ s/"$/button.lid_init_state=open i915.enable_fbc=0"/' /etc/default/grub && \
    sudo update-initramfs -u -k all && \
    sudo update-grub
    

    This command adds kernel boot options needed for Ubuntu to run properly on the Tensorbook.

Lambda Stack is now reinstalled in Ubuntu.


Last modified February 11, 2023: Use more popular name (8ae4ab5)