I lost a lot of time today with a stupid issue I had with docker. I’m playing around with OpenUI (more about it in another post) and wanted to use it in combination with Ollama to limit the costs.
In the documentation I found I could do this by setting the OLLAMA_HOST environment variable on startup.
I know I had to use the --env
or –e
parameter to pass the value. So this was my original attempt:
docker run --rm --name openui -p 7878:7878 ghcr.io/wandb/openui --env OLLAMA_HOST=http://host.docker.internal:11434
Unfortunately when I took a look at the logs, I noticed that the default value was still used:
I lost a lot of time until I finally discovered that the environment variable should be set BEFORE the image. Here is the updated and working command:
docker run --rm --name openui -p 7878:7878 --env OLLAMA_HOST=http://host.docker.internal:11434 ghcr.io/wandb/openui