autonomoususer

joined 2 years ago
[–] autonomoususer@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

Thanks! This was written more as a template for a following Windows guide (harm reducing).

 

cross-posted from: https://lemmy.world/post/28493612

Open WebUI lets you download and run large language models (LLMs) on your device using Ollama.

Install Ollama

See this guide: https://lemmy.world/post/27013201

Install Docker (recommended Open WebUI installation method)

  1. Open Console, type the following command and press return. This may ask for your password but not show you typing it.
sudo pacman -S docker
  1. Enable the Docker service [on-device and runs in the background] to start with your device and start it now.
sudo systemctl enable --now docker
  1. Allow your current user to use Docker.
sudo usermod -aG docker $(whoami)
  1. Log out and log in again, for the previous command to take effect.

Install Open WebUI on Docker

  1. Check whether your device has an NVIDIA GPU.
  2. Use only one of the following commands.

Your device has an NVIDIA GPU:

docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda

Your device has no NVIDIA GPU:

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Configure Ollama access

  1. Edit the Ollama service file. This uses the text editor set in the $SYSTEMD_EDITOR environment variable.
sudo systemctl edit ollama.service
  1. Add the following, save and exit.
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
  1. Restart the Ollama service.
sudo systemctl restart ollama

Get automatic updates for Open WebUI (not models, Ollama or Docker)

  1. Create a new service file to get updates using Watchtower once everytime Docker starts.
sudoedit /etc/systemd/system/watchtower-open-webui.service
  1. Add the following, save and exit.
[Unit]
Description=Watchtower Open WebUI
After=docker.service
Requires=docker.service

[Service]
Type=oneshot
ExecStart=/usr/bin/docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
RemainAfterExit=true

[Install]
WantedBy=multi-user.target
  1. Enable this new service to start with your device and start it now.
sudo systemctl enable --now watchtower-open-webui
  1. (Optional) Get updates at regular intervals after Docker has started.
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui

Use Open WebUI

  1. Open localhost:3000 in a web browser.
  2. Create an on-device Open WebUI account as shown.
[–] autonomoususer@lemmy.world 25 points 5 days ago (1 children)
 

cross-posted from: https://lemmy.world/post/27088416

This is an update to a previous post found at https://lemmy.world/post/27013201


Ollama uses the AMD ROCm library which works well with many AMD GPUs not listed as compatible by forcing an LLVM target.

The original Ollama documentation is wrong as the following can not be set for individual GPUs, only all or none, as shown at github.com/ollama/ollama/issues/8473

AMD GPU issue fix

  1. Check your GPU is not already listed as compatibility at github.com/ollama/ollama/blob/main/docs/gpu.md#linux-support
  2. Edit the Ollama service file. This uses the text editor set in the $SYSTEMD_EDITOR environment variable.
sudo systemctl edit ollama.service
  1. Add the following, save and exit. You can try different versions as shown at github.com/ollama/ollama/blob/main/docs/gpu.md#overrides-on-linux
[Service]
Environment="HSA_OVERRIDE_GFX_VERSION=10.3.0"
  1. Restart the Ollama service.
sudo systemctl restart ollama
[–] autonomoususer@lemmy.world 3 points 1 month ago* (last edited 1 month ago)

Cosmos Cloud fails to include a libre software license text file. We do not control it, anti-libre software. This defeats the purpose of running Ollama, libre software, on our own device.

Also, although Docker on Arch Linux is fine, Docker Desktop used to install Docker on Windows is also anti-libre software. The upcoming guide will provide a workaround. Of course, Windows is anti-libre software, so this is for harm reduction at best.

However, thank you for freeing this information from Discord, also anti-libre software.

38
submitted 1 month ago* (last edited 4 days ago) by autonomoususer@lemmy.world to c/selfhosted@lemmy.world
 

cross-posted from: https://lemmy.world/post/27013201

Ollama lets you download and run large language models (LLMs) on your device.

Install Ollama on Arch Linux

  1. Check whether your device has an AMD GPU, NVIDIA GPU, or no GPU. A GPU is recommended but not required.
  2. Open Console, type only one of the following commands and press return. This may ask for your password but not show you typing it.
sudo pacman -S ollama-rocm    # for AMD GPU
sudo pacman -S ollama-cuda    # for NVIDIA GPU
sudo pacman -S ollama         # for no GPU (for CPU)
  1. Enable the Ollama service [on-device and runs in the background] to start with your device and start it now.
sudo systemctl enable --now ollama

Test Ollama alone

  1. Open localhost:11434 in a web browser and you should see Ollama is running. This shows Ollama is installed and its service is running.
  2. Run ollama run deepseek-r1 in a console and ollama ps in another, to download and run the DeepSeek R1 model while seeing whether Ollama is using your slow CPU or fast GPU.

AMD GPU issue fix

https://lemmy.world/post/27088416

Use with Open WebUI

See this guide: https://lemmy.world/post/28493612