From 330bf9a6386b76a5fe37ec6575925bc9d5e1bc40 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Thu, 24 Apr 2025 17:52:21 -0300 Subject: [PATCH] Add ollama and open webui --- ollama/docker-compose.yml | 18 ++++++++++++++++++ open-webui/docker-compose.yml | 6 ++---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 ollama/docker-compose.yml diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml new file mode 100644 index 0000000..c6228d1 --- /dev/null +++ b/ollama/docker-compose.yml @@ -0,0 +1,18 @@ + +services: + ollama: + image: ollama/ollama:latest + container_name: ollama + network_mode: host + expose: + - "11434" + restart: unless-stopped + volumes: + - /home/isaac/Ollama:/root/.ollama + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] \ No newline at end of file diff --git a/open-webui/docker-compose.yml b/open-webui/docker-compose.yml index b86c43e..654aa10 100644 --- a/open-webui/docker-compose.yml +++ b/open-webui/docker-compose.yml @@ -1,15 +1,13 @@ services: # Eventually once on server with good gpu, use ollama instead of localhost open-webui: - image: ghcr.io/open-webui/open-webui:dev + image: ghcr.io/open-webui/open-webui:main container_name: open-webui volumes: - /docker/appdata/open-webui/data:/app/backend/data ports: - 9009:8080 environment: - - 'OLLAMA_BASE_URL=http://192.168.2.32:11434' + - 'OLLAMA_BASE_URL=http://127.0.0.1:11434' # - 'WEBUI_SECRET_KEY=' Set this for jwt secret key. Should be rendomly generated at start - extra_hosts: - - host.docker.internal:host-gateway restart: unless-stopped \ No newline at end of file