
Ruben AlvaradoOriginally published on Hashnode. You can self-host LLMs to automate tasks on your system like...
Originally published on Hashnode.
You can self-host LLMs to automate tasks on your system like retrieving information from a website, writing a database, interacting with note apps, etc. To set up a PC for these automations you can install Docker and LM Studio. This document provides step-by-step instructions for installing and configuring these tools.🤓
Docker Desktop provides pre-packaged MCP servers to interact with web tools, databases, and other systems. It integrates seemlesly with LM Studio, which runs and manages your local LLMs.
Before installing and running these tools, it is important to ensure that your system supports hardware virtualization, which is required for efficient container and virtual machine execution.
First check that you have kmv module loaded to linux kernel with this command
lsmod | grep kvm
You should get a response like this that shows that kvm is running
08:14:19
kvm_intel 487424 18
kvm 1425408 17 kvm_intel
irqbypass 12288 1 kvm
Download latest DEB package. In my case I used this lnk
Docker Desktop DEB package Download Link
Install the package using apt. Replace <route_to_download_folder> with the route where you have your downloads.
sudo apt-get update
cd <route_to_download_folder>
sudo apt-get install ./docker-desktop-amd64.deb
Sucess you now have Docker Desktop!🤵
LM Studio lets you run large language models locally on your PC, including models such as LLaMA, Mistral, and DeepSeek. Running models locally ensures full privacy and allows you to work offline.
To install LM Studio, download the application from the official website:
Follow these commands to install app image. Replace <lmstudio_folder> and <download_folder> with the respective routes in your PC.
mkdir <lmstudio_folder>
cd <lmstudio_folder>
mv <download_folder>/LM-Studio-0.3.36-1-x64.AppImage .
sudo chmod +x LM-Studio-0.3.36-1-x64.AppImage
./LM-Studio-0.3.36-1-x64.AppImage -appimage-extract
After extraction is complete, navigate to this folder inside <lmstudio_folder> and set chrome-sandbox to be executed as root from a normal user (no sudo command requiered for execution)
cd squashfs-root
sudo chown root:root chrome-sandbox
sudo chmod 4755 chrome-sandbox
Now enable LM Studio to be found when you press windows (super key) in Ubuntu. Follow these commands to create the desktop file.
cd ~/.local/share/applications/
sudo nano lmstudio.desktop
Paste these lines to the desktop file. Replace <USER_NAME> with your username in your PC
[Desktop Entry]
Name=LM Studio
Type=Application
Exec=/home/<USER_NAME>/lmStudio/squashfs-root/lm-studio
Icon=/home/<USER_NAME>/lmStudio/squashfs-root/lm-studio.png
Terminal=false
Press the super key and type “lm studio”. You can access the application without knowing its exact location now.🤩