3 ms·
thank you! for ollama running on your host machine, you'll need to modify the docker configuration since by default it's looking at http://localhost:11434 http
by waleedlatif1 1y ago
thank you!
for ollama running on your host machine, you'll need to modify the docker configuration since by default it's looking at http://localhost:11434 http://localhost:11434 which points to localhost inside the container, not your host. you can either add `extra_hosts` as `host.docker.internal:host-gateway` to your docker compose and set the OLLAMA_HOST envvar to `OLLAMA_HOST=http://host.docker.internal:11434 http://host.docker.internal:11434`, or just run `docker compose up --profile local-cpu -d --build --network=host` when running the compose command.
will add this to the readme and add in some UI locally so its easily configurable! let me know if you have any issues
- rahimnathwani 1y agoI modified the docker-compose.yml thus: ... services: simstudio: build: context: . dockerfile: Dockerfile ports: - "3000:3000" volumes: - ./sim:/app - /app/node_modules - /app/.next extra_hosts: - "host.docker.internal:host-gateway" environment: - OLLAMA_HOST=http://host.docker.internal:11434 - NODE_ENV=development - DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio ... Then I ran `docker compose up -d --build` Then I went to localhost:3000/w/ Then I added an Agent block. I expected ollama (or my ollama models) to show up in the drop-down, but I only see the hosted models. I even tried editing `sim/providers/ollama/index.ts`: const OLLAMA_HOST = 'http://host.docker.internal:11434' Any ideas? (BTW I did NOT run `--profile local-cpu` because I didn't want to run ollama in a docker container, as it's already running on the host.)
- waleedlatif1 1y agoi think it could be one of a few things: - first, even though your ollama is running on the host, you still need to use the local profile flag to enable ollama models in the UI. you can do this by running the docker compose command with `local-cpu` - also, make sure your host ollama is actually running and responding (curl http://localhost:11434/api/tags http://localhost:11434/api/tags should show your models) - if neither of the above work, you may need to restart the app container after changing the OLLAMA_HOST value
- rahimnathwani 1y agoI see this in the docker compose logs, but those models don't show up in the model drop-down on the Agent block: simstudio-1 | [2025-04-29T03:41:12.195Z] [INFO] [OllamaStore] Updating Ollama models { simstudio-1 | "models": [ simstudio-1 | "hf.co/bartowski/Qwen_Qwen3-32B-GGUF:latest", simstudio-1 | "qwen3:30b-a3b-q4_K_M", simstudio-1 | "gemma3:12b-it-qat", simstudio-1 | "gemma3:4b-it-q4_K_M", simstudio-1 | "nomic-embed-text:latest" simstudio-1 | ] simstudio-1 | } simstudio-1 | [2025-04-29T03:41:12.195Z] [INFO] [ProviderUtils] Updated Ollama provider models { simstudio-1 | "models": [ simstudio-1 | "hf.co/bartowski/Qwen_Qwen3-32B-GGUF:latest", simstudio-1 | "qwen3:30b-a3b-q4_K_M", simstudio-1 | "gemma3:12b-it-qat", simstudio-1 | "gemma3:4b-it-q4_K_M", simstudio-1 | "nomic-embed-text:latest" simstudio-1 | ] simstudio-1 | } Whether or not I include `--profile local-cpu` in the docker compose command: - the models from my local ollama show up in the logs, and - the models don't show up in the model drop-down in the Agent block. AFAICT the only impact of `--profile local-cpu` is starting a docker container with ollama running.
- waleedlatif1 1y agojust pushed a hotfix that should resolve this for you! let me know if you are still having issues. we recently updated the csp and needed to explicitly add the ollama endpoint to the connect-src directive
- rahimnathwani 1y agoI updated, deleted docker volumes, and retried, and I still see the same issue :(
- waleedlatif1 1y agotried another fix! let me know if that resolves it for you, otherwise you can join the discord and I can help you debug to the best of my ability. sorry for the hassle