差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:ollama [2024/06/12 09:21] – [評估安裝環境運行 Model 的效能] jonathantech:ollama [2024/12/18 18:34] (目前版本) – [Open WebUI 設定 Gemini API] jonathan
行 1: 行 1:
-====== Ollama + Open-WebUI  ======+====== Ollama + Open-WebUI ======
   * 安裝環境 VM 規格 :    * 安裝環境 VM 規格 : 
     * vCPU : 8 ([host] i7-11700 支援 avx2)     * vCPU : 8 ([host] i7-11700 支援 avx2)
     * RAM : 8G     * RAM : 8G
     * SSD : 64G     * SSD : 64G
-  * OS : Ubuntu 20.04+  * OS : Alpine 3.19 + docker compose
  
 ===== 使用 docker compose 快速安裝測試 ===== ===== 使用 docker compose 快速安裝測試 =====
行 25: 行 25:
     networks:     networks:
       - ollama-docker       - ollama-docker
 +    #deploy:
 +    #  resources:
 +    #    reservations:
 +    #      devices:
 +    #        - driver: nvidia
 +    #          count: 1
 +    #          capabilities: [gpu]
  
   ollama-webui:   ollama-webui:
行 40: 行 47:
       - host.docker.internal:host-gateway       - host.docker.internal:host-gateway
     restart: unless-stopped     restart: unless-stopped
 +    networks:
 +      - ollama-docker
 +
 +  pipelines:
 +    image: ghcr.io/open-webui/pipelines:main
 +    container_name: pipelines
 +    ports:
 +      - "9099:9099"
 +    volumes:
 +      - ./ollama/pipelines:/app/pipelines
 +    extra_hosts:
 +      - "host.docker.internal:host-gateway"
 +    restart: always
     networks:     networks:
       - ollama-docker       - ollama-docker
行 52: 行 72:
   * Open-WebUI 網址 - http://Server-IP:8080   * Open-WebUI 網址 - http://Server-IP:8080
   * Ollama API 網址 - http://Server-IP:11434   * Ollama API 網址 - http://Server-IP:11434
 +
 +==== Open WebUI 設定 pipeline 使用雲端 LLM API ===
 +  * 採用 pipeline 機制 - https://docs.openwebui.com/pipelines/pipes
 +  - 設定 **連線** 新增 **http://host.docker.internal:9099** API Key: **0p3n-w3bu!** ++ 看畫面| \\ {{:tech:螢幕擷取畫面_2024-11-13_070742.png|}}++
 +
 +=== Anthropic API ===
 +  - **管線(pipeline)** 從 ++GitHub URL 安裝| \\ Repo - https://github.com/open-webui/pipelines/tree/main/examples/pipelines \\ https://raw.githubusercontent.com/open-webui/pipelines/refs/heads/main/examples/pipelines/providers/anthropic_manifold_pipeline.py \\ {{:tech:螢幕擷取畫面_2024-11-13_071123.png|}}++
 +  - ++下拉模型就可以選到 anthropic/claude 多個模型| \\ {{:tech:螢幕擷取畫面_2024-11-13_071537.png|}}++
 +  - ++將不想使用的模型隱藏| \\ {{:tech:螢幕擷取畫面_2024-11-15_144257.png|}}++
 +
 +=== Gemini API ===
 +  - **管線(pipeline)** 從 ++GitHub URL 安裝| \\ Repo - https://github.com/open-webui/pipelines/tree/main/examples/pipelines \\ https://raw.githubusercontent.com/open-webui/pipelines/refs/heads/main/examples/pipelines/providers/google_manifold_pipeline.py++
  
 ==== Model ===== ==== Model =====
行 57: 行 89:
   * [[https://ollama.com/library/llama3|llama3]]   * [[https://ollama.com/library/llama3|llama3]]
   * [[https://ollama.com/library/codestral|codestral]]   * [[https://ollama.com/library/codestral|codestral]]
 +
 +  * 下載語法 Exp. ycchen/breeze-7b-instruct-v1_0 <cli>
 +docker exec ollama ollama pull ycchen/breeze-7b-instruct-v1_0
 +</cli>
  
 ==== 評估安裝環境運行 Model 的效能 ===== ==== 評估安裝環境運行 Model 的效能 =====
  • tech/ollama.1718155267.txt.gz
  • 上一次變更: 2024/06/12 09:21
  • jonathan