Add gpu to ollama
All checks were successful
ShellCheck / shellcheck (push) Successful in 22s

This commit is contained in:
Mathieu Strypsteen 2024-11-26 09:04:59 +01:00
parent 71d00e7789
commit 1fc04c2c49
Signed by: mathieu
GPG key ID: 782A42E461BC6824
4 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,7 @@
FROM quay.io/fedora/fedora-toolbox:41 FROM quay.io/fedora/fedora-toolbox:41
RUN dnf up -y RUN dnf up -y
RUN dnf install -y bash-color-prompt clang clang-tools-extra gcc hyperfine java-devel llvm mtools nodejs-npm openssl-devel parted poetry postgresql-server python3-pip qemu-system-x86-core rustup systemd-container vim-enhanced RUN dnf install -y bash-color-prompt clang clang-tools-extra gcc hyperfine java-devel llvm mtools nodejs-npm openssl-devel parted poetry postgresql-server python3-pip qemu-system-x86-core rustup systemd-container vim-enhanced
RUN dnf install -y https://github.com/coder/code-server/releases/download/v4.95.2/code-server-4.95.2-amd64.rpm RUN dnf install -y https://github.com/coder/code-server/releases/download/v4.95.3/code-server-4.95.3-amd64.rpm
RUN mkdir /etc/systemd/system/user@.service.d RUN mkdir /etc/systemd/system/user@.service.d
RUN mkdir /var/lib/systemd/linger RUN mkdir /var/lib/systemd/linger
RUN touch /var/lib/systemd/linger/coder RUN touch /var/lib/systemd/linger/coder

View file

@ -1,5 +1,9 @@
[Container] [Container]
Image=docker.io/ollama/ollama Image=docker.io/ollama/ollama
AddDevice=nvidia.com/gpu=all
Volume=ollama.volume:/root/.ollama/models:U,Z
Environment=OLLAMA_NOHISTORY=true
PublishPort=11434:11434
AutoUpdate=registry AutoUpdate=registry
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

View file