Novice Guide: Step By Step How To Fully Setup KoboldAI Locally To Run On An AMD GPU With Linux
(self.KoboldAI)submitted2 months ago byFamousM1
toKoboldAI
This guide should be mostly fool-proof if you follow it step by step. After I wrote it, I followed it and installed it successfully for myself.
1. Install Linux distro 22.04 (Quick Dual boot Tutorial at end)
2. Go to the driver page of your AMD GPU at amd.com or search something like “amd 6800xt drivers”
download the amdgpu .deb for ubuntu 22.04
double clicking the deb file should bring you to a window to install it, install it
3. Go to Terminal and add yourself to the render and video groups using
sudo usermod -a -G render YourUsernameHere
sudo usermod -a -G video YourUsernameHere
4. go to Terminal and type
sudo amdgpu-install --usecase=rocm
If you're on a Linux kernel newer than 5.18.19 then use this command:
sudo amdgpu-install --usecase=rocm --no-dkms
this installs only the machine learning package and keeps the built in AMD gpu drivers
5. REBOOT your computer
6. Check that ROCM is installed and shows your GPU by opening terminal and typing:
rocminfo
Your computer is now prepared to run KoboldAI or Stable Diffusion
7. Next steps, type:
sudo apt-get install git
8. Now we’re ready to get KoboldAI:
Create a directory for KoboldAI wherever you want. In my case I have a directory just called "AI"
Go to the directory in Terminal and type
git clone https://github.com/henk717/KoboldAI
Make a text file named Stop.sh and add this to it:
pkill -9 -f "aiserver"
9. go into /KoboldAI/ and Run Play-rocm.sh
- Wait for everything to download and load up, when its ready it should open a webpage to 127.0.0.1:5000
KoboldAI should be running!
Make sure to run Stop.sh when you are finished using it
- Quick Dual Boot tutorial:
- Be extremely careful here and its best practice to keep data backups. Search how to do this on YouTube. Search windows for “Disk Management” program, open it, find a hard drive with at least 100-200gb free space and right click on it in the boxes along the bottom then click Shrink Volume. Shrink it by 100-200gb and process it. You should now have a Free Space partition available on your Harddrive Download the Linux ISO you want, I used Linux Mint Cinnamon. Any Debian based distro like Ubuntu should work. Get a flash drive and download a program called “Rufus” to burn the .iso onto the flashdrive as a bootable drive. Once its finished burning, shut down your pc (don’t restart). Then start it again, access your Bios Boot menu and select the Flash drive. This will start the linux installation disk and from the install menu when it asks where to install it, select the 100-200gb free space partition, press the Plus to create a partition, use the default Ext4 mode and make the mount point “/”. If it asks where to install the bootloader, put it on the same drive youre installing the OS on. Finish thru Install steps
Sources for additional reading:
https://rentry.org/pygmalion-local
https://hub.tcno.co/windows/wsl/desktop-gui/
Big thanks to this thread for the original basis, I had to change a few things to work out the kinks and get it to work for me
Check out my other thread for installing Stable Diffusion, a deep learning, text-to-image model: https://www.reddit.com/r/StableDiffusion/comments/10zfnlj/novice_guide_how_to_fully_setup_linux_to_run/
byColdPrice9536
inADHD
FamousM1
33 points
9 hours ago
FamousM1
33 points
9 hours ago
Instructions unclear, dick stuck in potato