From bda6e4f4086520c43a9a77aa7a4d07b85ff1a4b9 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 7 Mar 2024 04:03:39 +0300 Subject: [PATCH 1/3] ollama. Adding /dev/dri and /dev/kfd devices pass. --- ollama/.env.dist | 5 ++++- ollama/docker-compose.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ollama/.env.dist b/ollama/.env.dist index 075293f..123f8ca 100644 --- a/ollama/.env.dist +++ b/ollama/.env.dist @@ -2,11 +2,14 @@ OLLAMA_IMAGE_TAG=latest UI_IMAGE_TAG=main -#HOST_USER=1000 +# Ollama HOST_OLLAMA_DATA_DIR=./data/ollama HTTP_OLLAMA_BIND_ADDR=127.0.0.1 HTTP_OLLAMA_BIND_PORT=11434 +DEV_KFD=/dev/kfd +DEV_DRI=/dev/dri +# Open WebUI HOST_UI_DATA_DIR=./data/open-webui HTTP_UI_BIND_ADDR=127.0.0.1 HTTP_UI_BIND_PORT=8010 diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml index 4997858..52bea33 100644 --- a/ollama/docker-compose.yml +++ b/ollama/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3.9' services: webui: @@ -25,6 +25,9 @@ services: - "${HOST_OLLAMA_DATA_DIR:-./data}:/root/.ollama" ports: - "${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 restart: unless-stopped logging: -- 2.43.5 From 7a27cc517700ccd0b4b8f4fd27d065b1a33cf0e3 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 7 Mar 2024 04:08:51 +0300 Subject: [PATCH 2/3] ollama. Fix devices syntax. --- ollama/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml index 52bea33..368510b 100644 --- a/ollama/docker-compose.yml +++ b/ollama/docker-compose.yml @@ -26,7 +26,7 @@ services: ports: - "${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_DRI:-/dev/dri}:${DEV_DRI:-/dev/dri}" - "${DEV_KFD:-/dev/kfd}:${DEV_KFD:-/dev/kfd}" env_file: .env restart: unless-stopped -- 2.43.5 From 056a5dcba51d2dc7216ec93cc3dcf1919645ae8e Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Thu, 7 Mar 2024 05:03:40 +0300 Subject: [PATCH 3/3] ollama. Adding ROCM tag example to .env.dist. --- ollama/.env.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ollama/.env.dist b/ollama/.env.dist index 123f8ca..7bfe0cf 100644 --- a/ollama/.env.dist +++ b/ollama/.env.dist @@ -1,4 +1,6 @@ # see https://hub.docker.com/r/ollama/ollama +#OLLAMA_IMAGE_TAG=rocm +#OLLAMA_IMAGE_TAG=0.1.28-rocm OLLAMA_IMAGE_TAG=latest UI_IMAGE_TAG=main -- 2.43.5