admin管理员组

文章数量:1291297

I have installed Docker on Windows 10 and subsequently set up ollama and openwebui within Docker. The command used to install ollama was:

docker run --gpus all -d -v /opt/ai/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

The command used to install openwebui was:

docker run -d -p 8080:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda

Now I'm encountering an issue where, after the first time opening openwebui and pulling an opensource model (let's assume it is qwen2.5:14b), the model works properly and can utilize the GPU for generation tasks. However, when I close openwebui and restart Docker, the model list becomes empty and the previously pulled model cannot be found in the model list anymore. It requires another download so as to use the model.

I hope that every time I open openwebui, the previously downloaded models will appear in the model list without needing to be re-downloaded. I understand that there might be an issue with parameter settings, but since I am not familiar with Docker, I don't know how to adjust it appropriately.

Installation Method [Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]

Environment Docker Desktop Version: [4.34.3 (170107)]

Open WebUI Version: [latest]

Ollama Version: [latest]

Operating System: [Windows 10]

Browser: [Chrome 131.0.6778.265]

I have installed Docker on Windows 10 and subsequently set up ollama and openwebui within Docker. The command used to install ollama was:

docker run --gpus all -d -v /opt/ai/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama

The command used to install openwebui was:

docker run -d -p 8080:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda

Now I'm encountering an issue where, after the first time opening openwebui and pulling an opensource model (let's assume it is qwen2.5:14b), the model works properly and can utilize the GPU for generation tasks. However, when I close openwebui and restart Docker, the model list becomes empty and the previously pulled model cannot be found in the model list anymore. It requires another download so as to use the model.

I hope that every time I open openwebui, the previously downloaded models will appear in the model list without needing to be re-downloaded. I understand that there might be an issue with parameter settings, but since I am not familiar with Docker, I don't know how to adjust it appropriately.

Installation Method [Describe the method you used to install the project, e.g., git clone, Docker, pip, etc.]

Environment Docker Desktop Version: [4.34.3 (170107)]

Open WebUI Version: [latest]

Ollama Version: [latest]

Operating System: [Windows 10]

Browser: [Chrome 131.0.6778.265]

Share Improve this question asked Feb 13 at 15:04 Yiyang WangYiyang Wang 1
Add a comment  | 

1 Answer 1

Reset to default 0

You should save changes (downloaded models, etc.) to the container.

To save changes made inside a Docker container, you can use two main methods: 1- Volumes 2- Committing Changes

I suggest the committing changes method.

see this website: https://thelinuxcode/save-docker-container-as-image/

save your Ollama container after downloading some models. and save your WebUI container if you need your chat history.

I hope it helps.

本文标签: ollamaEvery time I open OpenWebUIhave to redownload the modelsStack Overflow