ai:ollama-openwebui
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ai:ollama-openwebui [2024/06/28 14:29] – Wulf Rajek | ai:ollama-openwebui [2024/08/08 17:31] (current) – Wulf Rajek | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ollama Open-Webui ====== | ====== Ollama Open-Webui ====== | ||
+ | |||
+ | Note: You should have at least 8 GB of RAM available to run the 7B models, 16 GB to run the 13B models, and 32 GB to run the 33B models. | ||
Notes only for now: | Notes only for now: | ||
Line 19: | Line 21: | ||
<code - docker-ollama.yml> | <code - docker-ollama.yml> | ||
+ | name: ollama | ||
services: | services: | ||
ollama: | ollama: | ||
Line 34: | Line 37: | ||
devices: | devices: | ||
- driver: nvidia | - driver: nvidia | ||
- | device_ids: [' | + | |
+ | count: 1 | ||
capabilities: | capabilities: | ||
</ | </ | ||
<code - docker-openwebui.yml> | <code - docker-openwebui.yml> | ||
+ | name: open-webui | ||
services: | services: | ||
open-webui: | open-webui: | ||
Line 59: | Line 64: | ||
environment: | environment: | ||
- WEBUI_NAME=CustomGPTName | - WEBUI_NAME=CustomGPTName | ||
+ | - TZ=Europe/ | ||
+ | - RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE=True # allow sentencetransformers to execute code like for alibaba-nlp/ | ||
+ | |||
</ | </ | ||
<code - docker-openedai-speech.yml> | <code - docker-openedai-speech.yml> | ||
+ | name: openedai-speech | ||
services: | services: | ||
openedai-speech: | openedai-speech: | ||
Line 94: | Line 103: | ||
<code - docker-pipelines.yml> | <code - docker-pipelines.yml> | ||
+ | name: pipelines | ||
services: | services: | ||
pipelines: | pipelines: | ||
Line 113: | Line 123: | ||
capabilities: | capabilities: | ||
</ | </ | ||
+ | |||
+ | https:// | ||
+ | |||
Under settings-> | Under settings-> | ||
Line 123: | Line 136: | ||
<code - docker-faster-whisper-server.yml> | <code - docker-faster-whisper-server.yml> | ||
+ | name: faster-whisper-server | ||
services: | services: | ||
faster-whisper-server-cuda: | faster-whisper-server-cuda: | ||
Line 153: | Line 167: | ||
- | NOTE: speech to text requires https connection to open-webui as browsers do not have access to microphone on http connection! | + | NOTE: speech to text requires https connection to open-webui as browsers do not have access to microphone on http connection! |
< | < | ||
Line 161: | Line 175: | ||
</ | </ | ||
<code - / | <code - / | ||
+ | server { | ||
+ | listen 80; | ||
+ | server_name _; | ||
+ | return 301 https:// | ||
+ | } | ||
server { | server { | ||
listen 443 ssl; | listen 443 ssl; | ||
Line 166: | Line 185: | ||
ssl_certificate_key / | ssl_certificate_key / | ||
location / { | location / { | ||
- | | + | |
} | } | ||
} | } | ||
</ | </ | ||
- | <code - docker-ssl-proxy.yml> | + | <code - docker-ssl-proxy.yml> |
+ | name: nginx-proxy | ||
services: | services: | ||
nginx-proxy: | nginx-proxy: | ||
Line 177: | Line 197: | ||
container_name: | container_name: | ||
ports: | ports: | ||
+ | - 80:80 | ||
- 443:443 | - 443:443 | ||
volumes: | volumes: | ||
Line 186: | Line 207: | ||
- TZ=Europe/ | - TZ=Europe/ | ||
</ | </ | ||
+ | |||
+ | To pull an ollama image, better to use ollama directly as the webinterface doesn' | ||
+ | < | ||
+ | docker exec -ti ollama ollama pull imagename: | ||
+ | </ | ||
+ | |||
+ | To update all previously pulled ollama models, use this bash script: | ||
+ | <code bash update-ollama-models.sh> | ||
+ | #!/bin/bash | ||
+ | |||
+ | docker exec -ti ollama ollama list | tail -n +2 | awk ' | ||
+ | echo " | ||
+ | docker exec -t ollama ollama pull $model | ||
+ | echo " | ||
+ | done | ||
+ | echo "All models updated." | ||
+ | </ | ||
+ | |||
AMD GPU on Windows: | AMD GPU on Windows: | ||
Line 227: | Line 266: | ||
</ | </ | ||
- | docker install - WSL2 backend | + | Create the respective docker volumes folder: |
- | cmd line | + | < |
+ | # p/ | ||
+ | mkdir P: | ||
+ | </ | ||
+ | |||
+ | # docker install - choose the WSL2 backend | ||
+ | # cmd line | ||
< | < | ||
docker compose -f docker-openwebui.yml up -d | docker compose -f docker-openwebui.yml up -d | ||
Line 234: | Line 280: | ||
</ | </ | ||
- | mkdir | + | |
- | p/Docker_Volumes | + | to update all ollama models on windows, use this powershell command - adjust for the hostname/ip ollama is running on: |
+ | <code powershell> | ||
+ | (Invoke-RestMethod http:// | ||
+ | |||
+ | #or if in docker | ||
+ | (Invoke-RestMethod http:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Curl OpenAI API test ====== | ||
+ | |||
+ | < | ||
+ | curl http:// | ||
+ | -H " | ||
+ | -d '{ | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | }' | ||
+ | {" | ||
+ | </ |
ai/ollama-openwebui.1719581371.txt.gz · Last modified: 2024/06/28 14:29 by Wulf Rajek