2025-01-28

Install Deepseek R1 on Linux

How to install ollama with deepseek R1 (that will also install ROCm if you are using AMD GPU).

curl -fsSL https://ollama.com/install.sh | sh
sudo chown -R ollama /usr/share/ollama # just in case

# additional if using AMD GPU
curl -L https://ollama.com/download/ollama-linux-amd64-rocm.tgz -o ollama-linux-amd64-rocm.tgz
sudo tar -C /usr -xzf ollama-linux-amd64-rocm.tgz

# if you are using 6600XT and have ROCm installed
# add line below [System]
sudo vim /etc/systemd/system/ollama.service
Environment="HSA_OVERRIDE_GFX_VERSION=10.3.0
"

sudo systemctl start ollama
# or manually
ollama serve
# or AMD GPU 6600XT
HSA_OVERRIDE_GFX_VERSION=10.3.0 ollama serve

ollama run deepseek-r1

# or using gui http://localhost:8080
curl -LsSf https://astral.sh/uv/install.sh | sh
DATA_DIR=~/.open-webui uvx --python 3.11 open-webui@latest serve

That's it, you can chat directly with this new model.