Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
108fb6c1
Unverified
Commit
108fb6c1
authored
Sep 06, 2024
by
Jeffrey Morgan
Committed by
GitHub
Sep 06, 2024
Browse files
docs: improve linux install documentation (#6683)
Includes small improvements to document layout and code blocks
parent
da915345
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
39 deletions
+60
-39
docs/linux.md
docs/linux.md
+60
-39
No files found.
docs/linux.md
View file @
108fb6c1
#
Ollama on
Linux
# Linux
## Install
I
nstall Ollama run
ning this one-liner
:
To i
nstall Ollama
,
run
the following command
:
>
```
bash
```
shell
curl
-fsSL
https://ollama.com/install.sh | sh
```
##
AMD Radeon GPU support
##
Manual install
While AMD has contributed the
`amdgpu`
driver upstream to the official linux
kernel source, the version is older and may not support all ROCm features. We
recommend you install the latest driver from
https://www.amd.com/en/support/linux-drivers for best support of your Radeon
GPU.
Download and extract the package:
## Manual install
```
shell
curl
-L
https://ollama.com/download/ollama-linux-amd64.tgz
-o
ollama-linux-amd64.tgz
sudo tar
-C
/usr
-xzf
ollama-linux-amd64.tgz
```
Start Ollama:
```
shell
ollama serve
```
### Download `ollama`
In another terminal, verify that Ollama is running:
Download and extract the Linux package:
```
shell
ollama
-v
```
### AMD GPU install
```
bash
curl
-fsSL
https://ollama.com/download/ollama-linux-amd64.tgz |
sudo tar
zx
-C
/usr
If you have an AMD GPU, also download and extract the additional ROCm package:
```
shell
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 have an AMD GPU, also download and extract the ROCm package into the same location
```
bash
curl
-fsSL
https://ollama.com/download/ollama-linux-amd64-rocm.tgz |
sudo tar
zx
-C
/usr
### ARM64 install
Download and extract the ARM64-specific package:
```
shell
curl
-L
https://ollama.com/download/ollama-linux-arm64.tgz
-o
ollama-linux-arm64.tgz
sudo tar
-C
/usr
-xzf
ollama-linux-arm64.tgz
```
### Adding Ollama as a startup service (recommended)
Create a user and group for Ollama:
```
ba
sh
```
sh
ell
sudo
useradd
-r
-s
/bin/false
-U
-m
-d
/usr/share/ollama ollama
sudo
usermod
-a
-G
ollama
$(
whoami
)
```
...
...
@@ -63,47 +77,54 @@ WantedBy=default.target
Then start the service:
```
ba
sh
```
sh
ell
sudo
systemctl daemon-reload
sudo
systemctl
enable
ollama
```
### Install CUDA drivers (optional
– for Nvidia GPUs
)
### Install CUDA drivers (optional)
[
Download and install
](
https://developer.nvidia.com/cuda-downloads
)
CUDA.
Verify that the drivers are installed by running the following command, which should print details about your GPU:
```
ba
sh
```
sh
ell
nvidia-smi
```
### Install ROCm (optional - for Radeon GPUs)
[
Download and Install
](
https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html
)
### Install AMD ROCm drivers (optional)
Make sure to install
ROCm v6
[
Download and Install
](
https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html
)
ROCm v6
.
### Start Ollama
Start Ollama and verify it is running:
```
ba
sh
```
sh
ell
sudo
systemctl start ollama
sudo
systemctl status ollama
```
## Update
> [!NOTE]
> While AMD has contributed the `amdgpu` driver upstream to the official linux
> kernel source, the version is older and may not support all ROCm features. We
> recommend you install the latest driver from
> https://www.amd.com/en/support/linux-drivers for best support of your Radeon
> GPU.
## Updating
Update
o
llama by running the install script again:
Update
O
llama by running the install script again:
```
ba
sh
```
sh
ell
curl
-fsSL
https://ollama.com/install.sh | sh
```
Or by downloading
the ollama binary
:
Or by
re-
downloading
Ollama
:
```
bash
curl
-fsSL
https://ollama.com/download/ollama-linux-amd64.tgz |
sudo tar
zx
-C
/usr
```
shell
curl
-L
https://ollama.com/download/ollama-linux-amd64.tgz
-o
ollama-linux-amd64.tgz
sudo tar
-C
/usr
-xzf
ollama-linux-amd64.tgz
```
## Installing specific versions
...
...
@@ -112,15 +133,15 @@ Use `OLLAMA_VERSION` environment variable with the install script to install a s
For example:
```
curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.
1.32
sh
```
shell
curl
-fsSL
https://ollama.com/install.sh |
OLLAMA_VERSION
=
0.
3.9
sh
```
## Viewing logs
To view logs of Ollama running as a startup service, run:
```
ba
sh
```
sh
ell
journalctl
-e
-u
ollama
```
...
...
@@ -128,7 +149,7 @@ journalctl -e -u ollama
Remove the ollama service:
```
ba
sh
```
sh
ell
sudo
systemctl stop ollama
sudo
systemctl disable ollama
sudo rm
/etc/systemd/system/ollama.service
...
...
@@ -136,13 +157,13 @@ sudo rm /etc/systemd/system/ollama.service
Remove the ollama binary from your bin directory (either
`/usr/local/bin`
,
`/usr/bin`
, or
`/bin`
):
```
ba
sh
```
sh
ell
sudo rm
$(
which ollama
)
```
Remove the downloaded models and Ollama service user and group:
```
ba
sh
```
sh
ell
sudo rm
-r
/usr/share/ollama
sudo
userdel ollama
sudo
groupdel ollama
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment