From 56373cc68616424c07be256efef548c8e1048672 Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Wed, 5 Feb 2025 13:16:11 -0500 Subject: [PATCH] docs: add addn server guidance for Linux users in Quick Start Co-authored-by: Mert Parker Signed-off-by: Nathan Weinberg --- docs/source/getting_started/index.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/source/getting_started/index.md b/docs/source/getting_started/index.md index 00301d6e7..1307309ba 100644 --- a/docs/source/getting_started/index.md +++ b/docs/source/getting_started/index.md @@ -58,6 +58,23 @@ docker run -it \ ``` Configuration for this is available at `distributions/ollama/run.yaml`. +```{admonition} Note +:class: note + +Docker containers run in their own isolated network namespaces on Linux. To allow the container to communicate with services running on the host via `localhost`, you need `--network=host`. This makes the container use the host’s network directly so it can connect to Ollama running on `localhost:11434`. + +Linux users having issues running the above command should instead try the following: +```bash +docker run -it \ + -p $LLAMA_STACK_PORT:$LLAMA_STACK_PORT \ + -v ~/.llama:/root/.llama \ + --network=host \ + llamastack/distribution-ollama \ + --port $LLAMA_STACK_PORT \ + --env INFERENCE_MODEL=$INFERENCE_MODEL \ + --env OLLAMA_URL=http://localhost:11434 +``` + :::