I have installed docker on my WSL linux machine, and i have already been using ollama on windows. With these setup in mind i wrote this gist for future reference.
When you run ollama-webui on docker on wsl and your ollama already running on windows machine, webui can not connect to ollama running on windows. For it to work you need to take these steps:
Default makes ollama only accessible via localhost(127.0.0.1). To make it accessible on any network devices on the Windows machine, you need to add an environment variable named OLLAMA_HOST
with value of 0.0.0.0
. Check out the example below: