WebUI for LLMs (Ollama WebUI)  
https://github.com/open-webui/open-webui
     - 설치 방법 
https://docs.openwebui.com/getting-started/
//------------------------------------- 
< 설치전 준비 사항 > 
$ sudo apt-get update 
    - apt에서 HTTPS 가능하게 설정 
$ sudo apt-get install ca-certificates curl 
     -  Docker apt keyring 폴더 생성 
$ sudo install -m 0755 -d /etc/apt/keyrings 
     - Docker's official GPG key 추가 
$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc 
$ sudo chmod a+r /etc/apt/keyrings/docker.asc 
     - apt 저장소 추가 
$ echo \ 
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ 
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ 
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 
//------------------------------------- 
     - ollama 설치 
$ curl -fsSL https://ollama.com/install.sh | sh 
     - ollama 시작 
$ ollama serve 
     - ollama 접속확인 
http://127.0.0.1:11434/ 
//-----------------------------------------------------------------------------
< 참고 >
wsl 에서 docker 사용하기 , CUDA Docker, NVIDIA Container Toolkit 설치 방법
https://codens.tistory.com/2081
//-----------------------------------------------------------------------------
< webui 실행 >
     - docker 컨테이너 생성하고 시작 
$ docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
     - Nvidia CUDA 사용하는 경우
$ docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway --volume open-webui:/app/backend/data  --name open-webui-cuda --restart always ghcr.io/open-webui/open-webui:main 
     - 참고 : GPU 지원 docker (ollama 포함 - 주의! 모델 새로 설치) 
$ docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui-gpu --restart always ghcr.io/open-webui/open-webui:ollama 
//------------------------------------- 
     - docker 컨테이너가 생성된 후에는 이름으로 시작 
$  docker start open-webui 
//------------------------------------- 
     - Open WebUI  접속 
http://localhost:3000 
          - id 생성 요구 
     - model download 방법 
settings -> Models -> Pull a model from Ollama.com 
https://ollama.com/library 사이트에 있는 모델이름 입력 
//------------------------------------- 
     - 실행중인 컨테이너 보기 
$  docker ps
$  docker ps -a   # 중지된 컨테이너도 보기
     - 실행중인 컨테이너 중지 
$  docker stop <NAME> 
$  docker stop open-web-ui
'AI' 카테고리의 다른 글
| 음성 합성 AI - OpenVoice 사용법 (0) | 2024.04.30 | 
|---|---|
| huggingface 사용법 (인증, 다운로드 방법) (0) | 2024.04.28 | 
| Real-Time-Voice-Cloning 사용방법 (0) | 2024.04.19 | 
| [LLM] stablelm-2-12b-chat 사용법 (0) | 2024.04.16 | 
| AI 음악 생성 - AudioCraft 사용 방법 (0) | 2024.04.02 | 










