[GH-ISSUE #832] Set Ollama model directory in docker compose #12230

Closed
opened 2026-04-19 19:06:32 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @norton-chris on GitHub (Feb 21, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/832

I understand the Ollama handles the model directory folder, however, I'm launching Ollama and open-webui with docker compose: ./run-compose.sh --enable-gpu --build

I see in Ollama to set a different model directory you export OLLAMA_MODEL=/path/to/models

I did that in the docker-compose.yaml and added my models path to volumes /root/.ollama.
Here's a snippet of my docker-compose.yaml:

services:
  ollama:
    environment:
      - OLLAMA_MODELS=/root/.ollama/models
    volumes:
      - ollama:/root/.ollama
      - /mnt/2TB_SSD/text-gen/text-generation-webui/models:/root/.ollama/models
      ....(rest of docker-compose)

but I still don't see the models in the webui or when I run ollama list in the ollama docker container.

What am I doing wrong?

Originally created by @norton-chris on GitHub (Feb 21, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/832 I understand the Ollama handles the model directory folder, however, I'm launching Ollama and open-webui with docker compose: ./run-compose.sh --enable-gpu --build I see in Ollama to set a different model directory you export OLLAMA_MODEL=/path/to/models I did that in the docker-compose.yaml and added my models path to volumes /root/.ollama. Here's a snippet of my docker-compose.yaml: ``` services: ollama: environment: - OLLAMA_MODELS=/root/.ollama/models volumes: - ollama:/root/.ollama - /mnt/2TB_SSD/text-gen/text-generation-webui/models:/root/.ollama/models ....(rest of docker-compose) ``` but I still don't see the models in the webui or when I run `ollama list` in the ollama docker container. What am I doing wrong?
Author
Owner

@justinh-rahb commented on GitHub (Feb 21, 2024):

If you set that after having using Ollama with the default location, the models are not moved automatically, you'll need to do that. It could also be your drive formatting; I tried to do similar to you using an external drive, but because it was formatted with exFAT there was no symlink support, which causes Ollama to not see any of the models.

<!-- gh-comment-id:1957787361 --> @justinh-rahb commented on GitHub (Feb 21, 2024): If you set that after having using Ollama with the default location, the models are not moved automatically, you'll need to do that. It could also be your drive formatting; I tried to do similar to you using an external drive, but because it was formatted with exFAT there was no symlink support, which causes Ollama to not see any of the models.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#12230