Created
August 13, 2024 23:32
-
-
Save Heng-xiu/3871b011b0159f776f755fcd46fea857 to your computer and use it in GitHub Desktop.
用於解決一站式 ollama + webui 部署方案
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| ollama: | |
| image: ollama/ollama:latest | |
| # Expose Ollama API outside the container stack | |
| ports: | |
| - 11434:11434 | |
| volumes: | |
| - ollama:/root/.ollama | |
| container_name: ollama | |
| pull_policy: always | |
| tty: true | |
| restart: always | |
| ## GPU support (turn off by commenting with # if you don't have an nvidia gpu) | |
| #deploy: | |
| # resources: | |
| # reservations: | |
| # devices: | |
| # - driver: nvidia | |
| # count: 1 | |
| # capabilities: | |
| # - gpu | |
| # webui, nagivate to http://localhost:3000/ to use | |
| open-webui: | |
| image: ghcr.io/open-webui/open-webui:main | |
| container_name: open-webui | |
| volumes: | |
| - open-webui:/app/backend/data | |
| depends_on: | |
| - ollama | |
| ports: | |
| - 3000:8080 | |
| environment: | |
| - "OLLAMA_API_BASE_URL=http://ollama:11434/api" | |
| extra_hosts: | |
| - host.docker.internal:host-gateway | |
| restart: unless-stopped | |
| volumes: | |
| ollama: {} | |
| open-webui: {} |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
起手式,可以直接下指令,下載 yaml 檔案
wget https://gist.github.com/Heng-xiu/3871b011b0159f776f755fcd46fea857/raw/docker-compose.yml如果對指令不熟悉,可以點選頁面右上角 Raw 字樣把內文下載成本地端文件。