llm, go back to using host mode, seems to work as long as daemon.json exists with DNS servers, could not find a combination of the named network which worked well.
This commit is contained in:
1 parent
6ed4f284c0
commit
788a723690
1 file changed
+5
-19
@@ -448,18 +448,12 @@
|
||||
# Ensure cleanup on any exit (normal or signal from runit).
|
||||
trap 'kill "$LOOP_PID" 2>/dev/null; wait "$LOOP_PID" 2>/dev/null' EXIT
|
||||
|
||||
# Create a network for associated programs.
|
||||
net={{ llm_docker_network }}
|
||||
docker network inspect $net >/dev/null 2>&1 || \
|
||||
docker network create $net
|
||||
|
||||
# Start the open-webui program.
|
||||
set -e
|
||||
docker run \
|
||||
--name open-webui --network $net \
|
||||
-e PORT={{ open_webui_port }} \
|
||||
-p {{ open_webui_port }}:{{ open_webui_port }} \--add-host=host.docker.internal:host-gateway \
|
||||
-e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
|
||||
--name open-webui \
|
||||
--network host -e PORT={{ open_webui_port }} \
|
||||
-e OLLAMA_BASE_URL=http://0.0.0.0:11434 \
|
||||
{{ ("-e HF_TOKEN=" ~ hf_token) if hf_token else '' }} \
|
||||
-e WEBUI_SECRET_KEY={{ open_webui_key }} \
|
||||
-e ENABLE_QUERIES_CACHE=True \
|
||||
@@ -680,21 +674,13 @@
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/etc/open-terminal/compose.yml
|
||||
content: |
|
||||
networks:
|
||||
{{ llm_docker_network }}:
|
||||
name: {{ llm_docker_network }}
|
||||
external: true
|
||||
|
||||
services:
|
||||
open-terminal:
|
||||
build:
|
||||
context: ./
|
||||
image: hyperling-open-terminal:latest
|
||||
container_name: open-terminal
|
||||
ports:
|
||||
- {{ open_terminal_port }}:{{ open_terminal_port }}
|
||||
networks:
|
||||
- {{ llm_docker_network }}
|
||||
network_mode: host
|
||||
command: run --port {{ open_terminal_port }}
|
||||
environment:
|
||||
- OPEN_TERMINAL_FILE_BROWSER_ROOT=/home/user
|
||||
@@ -712,7 +698,7 @@
|
||||
- {{ jdk_etc17 }}:{{ jdk_etc17 }}:ro
|
||||
- {{ jdk_etc21 }}:{{ jdk_etc21 }}:ro
|
||||
- {{ jdk_etc25 }}:{{ jdk_etc25 }}:ro
|
||||
#- /etc/resolv.conf:/etc/resolv.conf:ro
|
||||
- /etc/resolv.conf:/etc/resolv.conf:ro
|
||||
- {{ user_user.home }}/.gradle:{{ user_user.home }}/.gradle
|
||||
- {{ user_user.home }}/.pub-cache:{{ user_user.home }}/.pub-cache
|
||||
owner: root
|
||||
|
||||
Reference in new issue
Block a user