Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 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`, 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



I 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.)


i 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 should show your models) - if neither of the above work, you may need to restart the app container after changing the OLLAMA_HOST value


I 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.


just 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


I updated, deleted docker volumes, and retried, and I still see the same issue :(


tried 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


I don't have more time to spend on it today, but will join your discord when I do.

Just documenting what I tried and what happened, in case it's helpful to you:

1. Delete all existing docker containers and volumes.

2. git pull

3. Add this to docker-compose.yml: - OLLAMA_HOST=http://host.docker.internal:11434

4. docker compose up --build

5. Visit localhost:3000/w/

6. Create an account.

7. Enter PIN.

8. Log in.

9. Observe the initial workflow with only the 'Start' block.

10. In the sidebar, click the 'Agent block'.

11. In the newly-created 'Agent' block, choose one of my local (ollama) models.

12. Click 'Run'.

Step 11 works. Step 12 results in a red error message "Workflow execution failed: Invalid block type: undefined {}".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: