Introduction
Ollama
Ollama 는 다양한 대규모 언어 모델(LLM)을 개인의 컴퓨터에서 직접 실행할 수 있도록 도와주는 오픈 소스 플랫폼. 복잡한 설정 없이 간단하게 사용할 수 있으며, Llama, Alpaca 등 다양한 LLM 모델을 지원.
Open WebUI
Open WebUI는 Llama와 같은 대규모 언어 모델(LLM)을 웹 기반 인터페이스를 통해 사용할 수 있도록 해주는 오픈 소스 프로젝트. ChatGPT를 웹 브라우저에서 직접 사용하듯이, Open WebUI를 통해 Ollama 모델과 자유롭게 대화하고 다양한 기능을 활용할 수 있음.
Deployment
두 개의 컨테이너 배포
1. LLM을 실제로 구동할 Ollama Server
2. Ollama Server를 Web과 통합할 Open WebUI
1. Deploying Ollama
Running Ollama on CPU Only
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
Running Ollama on AMD GPU that doesn't support ROCm
docker run -d --restart always --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama -e HSA_OVERRIDE_GFX_VERSION=10.3.0 -e HCC_AMDGPU_TARGET=gfx1030 ollama/ollama:rocm
Test ollama is succesfully installed:
docker exec ollama ollama list
2. Deploying Open WebUI
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -e WEBUI_AUTH=False --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Check Open WebUI is succesfully installed:
https://[server-address or localhost]:8080
Pulling LLM AI Models
References
Ollama docs : https://github.com/ollama/ollama/tree/main/docs
ollama/docs at main · ollama/ollama
Get up and running with Llama 3.1, Mistral, Gemma 2, and other large language models. - ollama/ollama
github.com
Open WebUI docs : https://docs.openwebui.com
🏡 Home | Open WebUI
Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs.
docs.openwebui.com
https://dev.to/berk/running-ollama-and-open-webui-self-hosted-4ih5
Running Ollama and Open WebUI Self-Hosted With AMD GPU
Why Host Your Own Large Language Model (LLM)? While there are many excellent LLMs...
dev.to