From 2e5bb983ed7c1040789e359bdfd0f9c889927806 Mon Sep 17 00:00:00 2001 From: Paul Schweigert Date: Mon, 2 Dec 2024 13:21:43 -0500 Subject: [PATCH] docs: connecting to ollama on linux (#52) Signed-off-by: Paul S. Schweigert --- docs/troubleshooting.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index c396eeb..bc38776 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -46,7 +46,7 @@ with your distribution to at least 8GB. If you use podman, you can do this using ```shell podman machine stop -podman machine set --memory 8192 --rootful +podman machine set --memory 8192 --rootful podman machine start ``` @@ -60,6 +60,23 @@ podman machine set --rootful podman machine start ``` +### Connecting to Ollama on Linux + +On Linux, using Ollama with the bee-stack requires some extra configuration: + +1. In your `.env` file, set `OLLAMA_URL=http://host.docker.internal:11434`. + +2. After starting the bee-stack, you will need to resolve `OLLAMA_URL` to the bee-stack bridge network. + + ``` + # exec into bee-api container + docker exec -it bee-stack-bee-api-1 sh + + # in container, add ip of bridge network to /etc/hosts + echo "$(ip route | awk '/default/ { print $3 }' | head -n 1) host.docker.internal" | tee -a /etc/hosts > /dev/null + ``` + + ## I'm lost If you encounter any of the issue above, and you're not sure what to do, we recommend using rancher-desktop: @@ -103,4 +120,4 @@ You can refer to the following podman issues: - https://github.com/containers/podman/issues/11319 Or go to the official podman troubleshooting guide: -https://podman-desktop.io/docs/troubleshooting \ No newline at end of file +https://podman-desktop.io/docs/troubleshooting