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).
|
# Ensure cleanup on any exit (normal or signal from runit).
|
||||||
trap 'kill "$LOOP_PID" 2>/dev/null; wait "$LOOP_PID" 2>/dev/null' EXIT
|
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.
|
# Start the open-webui program.
|
||||||
set -e
|
set -e
|
||||||
docker run \
|
docker run \
|
||||||
--name open-webui --network $net \
|
--name open-webui \
|
||||||
-e PORT={{ open_webui_port }} \
|
--network host -e PORT={{ open_webui_port }} \
|
||||||
-p {{ open_webui_port }}:{{ open_webui_port }} \--add-host=host.docker.internal:host-gateway \
|
-e OLLAMA_BASE_URL=http://0.0.0.0:11434 \
|
||||||
-e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
|
|
||||||
{{ ("-e HF_TOKEN=" ~ hf_token) if hf_token else '' }} \
|
{{ ("-e HF_TOKEN=" ~ hf_token) if hf_token else '' }} \
|
||||||
-e WEBUI_SECRET_KEY={{ open_webui_key }} \
|
-e WEBUI_SECRET_KEY={{ open_webui_key }} \
|
||||||
-e ENABLE_QUERIES_CACHE=True \
|
-e ENABLE_QUERIES_CACHE=True \
|
||||||
@@ -680,21 +674,13 @@
|
|||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: /usr/local/etc/open-terminal/compose.yml
|
dest: /usr/local/etc/open-terminal/compose.yml
|
||||||
content: |
|
content: |
|
||||||
networks:
|
|
||||||
{{ llm_docker_network }}:
|
|
||||||
name: {{ llm_docker_network }}
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
open-terminal:
|
open-terminal:
|
||||||
build:
|
build:
|
||||||
context: ./
|
context: ./
|
||||||
image: hyperling-open-terminal:latest
|
image: hyperling-open-terminal:latest
|
||||||
container_name: open-terminal
|
container_name: open-terminal
|
||||||
ports:
|
network_mode: host
|
||||||
- {{ open_terminal_port }}:{{ open_terminal_port }}
|
|
||||||
networks:
|
|
||||||
- {{ llm_docker_network }}
|
|
||||||
command: run --port {{ open_terminal_port }}
|
command: run --port {{ open_terminal_port }}
|
||||||
environment:
|
environment:
|
||||||
- OPEN_TERMINAL_FILE_BROWSER_ROOT=/home/user
|
- OPEN_TERMINAL_FILE_BROWSER_ROOT=/home/user
|
||||||
@@ -712,7 +698,7 @@
|
|||||||
- {{ jdk_etc17 }}:{{ jdk_etc17 }}:ro
|
- {{ jdk_etc17 }}:{{ jdk_etc17 }}:ro
|
||||||
- {{ jdk_etc21 }}:{{ jdk_etc21 }}:ro
|
- {{ jdk_etc21 }}:{{ jdk_etc21 }}:ro
|
||||||
- {{ jdk_etc25 }}:{{ jdk_etc25 }}: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 }}/.gradle:{{ user_user.home }}/.gradle
|
||||||
- {{ user_user.home }}/.pub-cache:{{ user_user.home }}/.pub-cache
|
- {{ user_user.home }}/.pub-cache:{{ user_user.home }}/.pub-cache
|
||||||
owner: root
|
owner: root
|
||||||
|
|||||||
Reference in new issue
Block a user