██▒   █▓ ▒█████   ██▓▓█████▄ 
▓██░   █▒▒██▒  ██▒▓██▒▒██▀ ██▌
 ▓██  █▒░▒██░  ██▒▒██▒░██   █▌
  ▒██ █░░▒██   ██░░██░░▓█▄   ▌
   ▒▀█░  ░ ████▓▒░░██░░▒████▓ 
   ░ ▐░  ░ ▒░▒░▒░ ░▓   ▒▒▓  ▒ 
   ░ ░░    ░ ▒ ▒░  ▒ ░ ░ ▒  ▒ 
     ░░  ░ ░ ░ ▒   ▒ ░ ░ ░  ░ 
      ░      ░ ░   ░     ░    
     ░                 ░      
    

 ___      ___ ________  ___  ________     
|\  \    /  /|\   __  \|\  \|\   ___ \    
\ \  \  /  / | \  \|\  \ \  \ \  \_|\ \   
 \ \  \/  / / \ \  \\\  \ \  \ \  \ \\ \  
  \ \    / /   \ \  \\\  \ \  \ \  \_\\ \ 
   \ \__/ /     \ \_______\ \__\ \_______\
    \|__|/       \|_______|\|__|\|_______|
    

Yane ✖ Karov

  • Installing LM Studio on Ubuntu 22.04 (Jammy)

    As there are currently no official instructions for installing LM Studio on Ubuntu 22.04 I decided to write my own.

    Let's jump into it

    Download the binary from the LM Studio website

    You can find the Beta releases page here

    First we need to install CLBlast to avoid ugly linking error's like this when running the AppImage

    A JavaScript error occurred in the main process
    Uncaught Exception:
    Error: /usr/local/lib/libclblast.so.1: cannot open shared object file: No such file or directory
        at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
        at Module._extensions..node (node:internal/modules/cjs/loader:1326:18)
        at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1822)
        at Module.load (node:internal/modules/cjs/loader:1096:32)
        at Module._load (node:internal/modules/cjs/loader:937:12)
        at f._load (node:electron/js2c/asar_bundle:2:13330)
        at Module.require (node:internal/modules/cjs/loader:1120:19)
        at require (node:internal/modules/cjs/helpers:103:18)
        at 6829 (/tmp/.mount_LM_StuIkHV0I/resources/app/.webpack/main/index.js:2:1930)
        at r (/tmp/.mount_LM_StuIkHV0I/resources/app/.webpack/main/index.js:8:401969)
    

    Install CLBlast

    sudo apt-get install libclblast-dev libclblast1
    

    List the location of the package files

    dpkg -L libclblast1 && dpkg -L libclblast-dev
    

    Link the library files to /usr/local/lib to ensure they are where the AppImage expects them

    sudo ln -s /usr/lib/x86_64-linux-gnu/libclblast.so.1 /usr/local/lib/libclblast.so.1 && sudo ln -s /usr/lib/x86_64-linux-gnu/libclblast.so /usr/local/lib/libclblast.so
    

    Configure executable permissions on the AppImage

    chmod +x LM_Studio-0.2.14-beta-1.AppImage
    

    Move the AppImage to a location in your PATH, so you can run it from the terminal without specifying the full path

    mv LM_Studio-0.2.14-beta-1.AppImage ~/.local/bin
    

    Run the AppImage

    ./LM_Studio-0.2.14-beta-1.AppImage
    

    Huzzah! You should now be able to install new LLMs and run them locally on your Ubuntu 22.04 machine.

    Next steps (optional)

    Download the LM Studio icon for the desktop entry (optional)

    mkdir -p ~/Themes/Icons/lm-studio
    curl -L https://lmstudio.ai/assets/android-chrome-512x512.png -o ~/Themes/Icons/lm-studio/lm-studio.png
    

    Create a desktop entry

    Note, if you kept the AppImage in your Downloads folder, you will need to change the path to the AppImage in the Exec line below, e.g., Exec=~/Downloads/LM_Studio-0.2.14-beta-1.AppImage

    echo "[Desktop Entry]
    Name=LM Studio
    Comment=LM Studio
    Exec=~/.local/bin/LM_Studio-0.2.14-beta-1.AppImage
    Icon=~/Themes/Icons/lm-studio/lm-studio.png
    Terminal=false
    Type=Application
    Categories=Development;" > ~/.local/share/applications/lm-studio.desktop
    

    © 2024 Yane ✖ Karov