ollama. Adding /dev/dri and /dev/kfd devices pass.

This commit is contained in:
Alexey Skobkin 2024-03-07 04:03:39 +03:00
parent ced3e5a902
commit bda6e4f408
No known key found for this signature in database
GPG key ID: 5D5CEF6F221278E7
2 changed files with 8 additions and 2 deletions

View file

@ -2,11 +2,14 @@
OLLAMA_IMAGE_TAG=latest OLLAMA_IMAGE_TAG=latest
UI_IMAGE_TAG=main UI_IMAGE_TAG=main
#HOST_USER=1000 # Ollama
HOST_OLLAMA_DATA_DIR=./data/ollama HOST_OLLAMA_DATA_DIR=./data/ollama
HTTP_OLLAMA_BIND_ADDR=127.0.0.1 HTTP_OLLAMA_BIND_ADDR=127.0.0.1
HTTP_OLLAMA_BIND_PORT=11434 HTTP_OLLAMA_BIND_PORT=11434
DEV_KFD=/dev/kfd
DEV_DRI=/dev/dri
# Open WebUI
HOST_UI_DATA_DIR=./data/open-webui HOST_UI_DATA_DIR=./data/open-webui
HTTP_UI_BIND_ADDR=127.0.0.1 HTTP_UI_BIND_ADDR=127.0.0.1
HTTP_UI_BIND_PORT=8010 HTTP_UI_BIND_PORT=8010

View file

@ -1,4 +1,4 @@
version: '3.7' version: '3.9'
services: services:
webui: webui:
@ -25,6 +25,9 @@ services:
- "${HOST_OLLAMA_DATA_DIR:-./data}:/root/.ollama" - "${HOST_OLLAMA_DATA_DIR:-./data}:/root/.ollama"
ports: ports:
- "${HTTP_OLLAMA_BIND_ADDR:-127.0.0.1}:${HTTP_OLLAMA_BIND_PORT:-11434}:11434/tcp" - "${HTTP_OLLAMA_BIND_ADDR:-127.0.0.1}:${HTTP_OLLAMA_BIND_PORT:-11434}:11434/tcp"
devices:
- "${DEV_DRI:/dev/dri}:${DEV_DRI:/dev/dri}"
- "${DEV_KFD:-/dev/kfd}:${DEV_KFD:-/dev/kfd}"
env_file: .env env_file: .env
restart: unless-stopped restart: unless-stopped
logging: logging: