From 5b8ec8fc3dc3abb77dccd59b0d1f34e9174ab724 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Tue, 12 Nov 2024 23:27:20 -0500 Subject: [PATCH] update compose --- docker-compose.amd.yml | 23 +++++++++++------------ docker-compose.base.yml | 5 ++--- docker-compose.cpu.yml | 13 ++++++------- docker-compose.nvidia.yml | 15 ++++++++------- ollama/.gitignore | 3 --- ollama/bootstrap.sh | 11 ----------- 6 files changed, 27 insertions(+), 43 deletions(-) delete mode 100644 ollama/.gitignore delete mode 100755 ollama/bootstrap.sh diff --git a/docker-compose.amd.yml b/docker-compose.amd.yml index f5325b7..e490fcc 100644 --- a/docker-compose.amd.yml +++ b/docker-compose.amd.yml @@ -6,11 +6,9 @@ services: ollama: image: ollama/ollama:rocm restart: unless-stopped - entrypoint: /bootstrap.sh - command: mistral - network_mode: service:open-webui - environment: - OLLAMA_HOST: http://localhost:11434 + ports: + - 11434:11434 + # begin for AMD GPU support devices: - /dev/kfd @@ -22,12 +20,13 @@ services: - SYS_PTRACE security_opt: - seccomp=unconfined - environment: - # https://github.com/ROCm/ROCm/issues/2625 - GPU_MAX_HW_QUEUES: 1 - # https://github.com/ROCm/ROCm/issues/2788#issuecomment-1915765846 - # HSA_OVERRIDE_GFX_VERSION: 11.0.0 + # environment: + # # https://github.com/ROCm/ROCm/issues/2788#issuecomment-1915765846 + # HSA_OVERRIDE_GFX_VERSION: 11.0.0 # end of section for AMD GPU support + volumes: - - ./ollama/bootstrap.sh:/bootstrap.sh:ro - - ./ollama:/root/.ollama \ No newline at end of file + - ollama_data:/root/.ollama + +volumes: + ollama_data: \ No newline at end of file diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 6b1e9b9..2f3716e 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -18,13 +18,12 @@ services: image: ghcr.io/open-webui/open-webui:main ports: - 8080:8080 - - 11434:11434 environment: - OLLAMA_BASE_URL: http://localhost:11434 + OLLAMA_BASE_URL: http://ollama:11434 + WEBUI_AUTH: "False" extra_hosts: - host.docker.internal:host-gateway volumes: - - ./litellm/config.yaml:/app/backend/data/litellm/config.yaml - open-webui_data:/app/backend/data volumes: diff --git a/docker-compose.cpu.yml b/docker-compose.cpu.yml index 362ff28..a3d5c2a 100644 --- a/docker-compose.cpu.yml +++ b/docker-compose.cpu.yml @@ -6,11 +6,10 @@ services: ollama: image: ollama/ollama:latest restart: unless-stopped - entrypoint: /bootstrap.sh - command: mistral - network_mode: service:open-webui - environment: - OLLAMA_HOST: http://localhost:11434 + ports: + - 11434:11434 volumes: - - ./ollama/bootstrap.sh:/bootstrap.sh:ro - - ./ollama:/root/.ollama \ No newline at end of file + - ollama_data:/root/.ollama + +volumes: + ollama_data: \ No newline at end of file diff --git a/docker-compose.nvidia.yml b/docker-compose.nvidia.yml index 81c413b..8c1f657 100644 --- a/docker-compose.nvidia.yml +++ b/docker-compose.nvidia.yml @@ -6,11 +6,9 @@ services: ollama: image: ollama/ollama:latest restart: unless-stopped - entrypoint: /bootstrap.sh - command: mistral - network_mode: service:open-webui - environment: - OLLAMA_HOST: http://localhost:11434 + ports: + - 11434:11434 + # begin for NVIDIA GPU support deploy: resources: @@ -20,6 +18,9 @@ services: count: 1 capabilities: [gpu] # end of section for NVIDIA GPU support + volumes: - - ./ollama/bootstrap.sh:/bootstrap.sh:ro - - ./ollama:/root/.ollama + - ollama_data:/root/.ollama + +volumes: + ollama_data: \ No newline at end of file diff --git a/ollama/.gitignore b/ollama/.gitignore deleted file mode 100644 index a882af8..0000000 --- a/ollama/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!bootstrap.sh diff --git a/ollama/bootstrap.sh b/ollama/bootstrap.sh deleted file mode 100755 index 714c659..0000000 --- a/ollama/bootstrap.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -x - -ollama serve & - -sleep 1 - -for model in ${@:-mistral}; do - ollama pull "$model" -done - -wait \ No newline at end of file