From e9f862ff7aba41dde02615b508b302cb8567672c Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Sat, 24 Feb 2024 02:56:40 +0300 Subject: [PATCH] ollama. Stack added (ollama + open-webui). --- README.md | 1 + ollama/.env.dist | 16 +++++++++++++++ ollama/data/ollama/.gitignore | 2 ++ ollama/data/open-webui/.gitignore | 2 ++ ollama/docker-compose.yml | 34 +++++++++++++++++++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 ollama/.env.dist create mode 100644 ollama/data/ollama/.gitignore create mode 100644 ollama/data/open-webui/.gitignore create mode 100644 ollama/docker-compose.yml diff --git a/README.md b/README.md index 7651a2f..5958fdc 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Not every stack is tested to fully work. | Metube | ✅ | `alexta69/metube` | Web GUI for yt-dlp. | [Github](https://github.com/alexta69/metube) | | Murmur (Mumble server) | ✅ | `registry.gitlab.com/skobkin/docker-murmur` | Mumble VoIP server (custom build) | [Website](https://www.mumble.info), [Github](https://github.com/mumble-voip/mumble) | | NextCloud | ❌ Unfinished | `nextcloud` | File management, synchronization, management and GTD platform. | [Website](https://nextcloud.com), [Github](https://github.com/nextcloud/server) | +| Ollama | ✅ | `ollama/ollama` | Toolkit for easily running LLM's locally. | [Website](https://ollama.com), [Github](https://github.com/ollama/ollama) | | Open Streaming Platform | ✅ | `deamos/openstreamingplatform` | Live streaming platform. | [Website](https://openstreamingplatform.com), [Gitlab](https://gitlab.com/osp-group/flask-nginx-rtmp-manager) | | OpenVPN | ✅ | `kylemanna/openvpn` | OpenVPN server with some management toolkit. | [Website](https://openvpn.net), [Image Github](https://www.github.com/kylemanna/docker-openvpn) | | Owncast | ✅ | `gabekangas/owncast` | Live streaming platform with federation support. | [Website](https://owncast.online), [Github](https://github.com/owncast/owncast) | diff --git a/ollama/.env.dist b/ollama/.env.dist new file mode 100644 index 0000000..075293f --- /dev/null +++ b/ollama/.env.dist @@ -0,0 +1,16 @@ +# see https://hub.docker.com/r/ollama/ollama +OLLAMA_IMAGE_TAG=latest +UI_IMAGE_TAG=main + +#HOST_USER=1000 +HOST_OLLAMA_DATA_DIR=./data/ollama +HTTP_OLLAMA_BIND_ADDR=127.0.0.1 +HTTP_OLLAMA_BIND_PORT=11434 + +HOST_UI_DATA_DIR=./data/open-webui +HTTP_UI_BIND_ADDR=127.0.0.1 +HTTP_UI_BIND_PORT=8010 +UI_SECRET_KEY=changeme + +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 diff --git a/ollama/data/ollama/.gitignore b/ollama/data/ollama/.gitignore new file mode 100644 index 0000000..a68d087 --- /dev/null +++ b/ollama/data/ollama/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/ollama/data/open-webui/.gitignore b/ollama/data/open-webui/.gitignore new file mode 100644 index 0000000..a68d087 --- /dev/null +++ b/ollama/data/open-webui/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/ollama/docker-compose.yml b/ollama/docker-compose.yml new file mode 100644 index 0000000..4997858 --- /dev/null +++ b/ollama/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.7' + +services: + webui: + image: "ghcr.io/open-webui/open-webui:${UI_IMAGE_TAG:-main}" + container_name: ollama-open-webui + volumes: + - "${HOST_UI_DATA_DIR:-./data/open-webui}:/app/backend/data" + depends_on: + - ollama + ports: + - "${HTTP_UI_BIND_ADDR:-127.0.0.1}:${HTTP_UI_BIND_PORT-3000}:8080" + environment: + - "OLLAMA_API_BASE_URL=http://ollama:11434/api" + - 'WEBUI_SECRET_KEY=${UI_SECRET_KEY:-changeme}' + #extra_hosts: + # - host.docker.internal:host-gateway + restart: unless-stopped + + ollama: + image: "ollama/ollama:${OLLAMA_IMAGE_TAG:-latest}" + container_name: ollama + #user: "${HOST_USER:-1000}" + volumes: + - "${HOST_OLLAMA_DATA_DIR:-./data}:/root/.ollama" + ports: + - "${HTTP_OLLAMA_BIND_ADDR:-127.0.0.1}:${HTTP_OLLAMA_BIND_PORT:-11434}:11434/tcp" + env_file: .env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" -- 2.40.1