-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (100 loc) · 3.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
103 lines (100 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Works with Docker Compose and Podman. For Podman, install a compose provider
# (e.g. `pip install podman-compose`) and run `podman compose up`.
services:
vault:
build:
context: .
dockerfile: Containerfile
image: ${IMAGE_NAME:-talkpipe-vault}
container_name: talkpipe-vault
ports:
- "${VAULT_PORT:-8002}:8002"
volumes:
- talkpipe_vault_data:/app/data
# Host documents to index, visible in the folder picker at /documents.
# Point VAULT_DOCUMENTS_DIR at any host folder (must exist).
# On SELinux hosts (e.g. Fedora) append :z, e.g. ".../documents:ro,z".
- ${VAULT_DOCUMENTS_DIR:-~/Documents}:/documents:ro
environment:
- VAULT_HOST=0.0.0.0
- VAULT_PORT=8002
# LanceDB path (same semantics as makevectordatabase --path).
# Whoosh index is created under VAULT_PATH/fulltext_vault.
- VAULT_PATH=/app/data/vault
# Persist web-interface settings (recent vaults, model choices) in the data volume
- TALKPIPE_VAULT_HOME=/app/data/vault-home
- TALKPIPE_OLLAMA_SERVER_URL=${TALKPIPE_OLLAMA_SERVER_URL:-http://host.containers.internal:11434}
# Hugging Face offline mode. Leave unset for auto-detection: the
# entrypoint probes huggingface.co at startup and switches to offline
# (cache-only) model loads when it is unreachable. The model downloads
# once, into the data volume. Set 1 in .env to force offline, 0 to
# force online (see .env.example).
- HF_HUB_OFFLINE=${HF_HUB_OFFLINE:-}
# Path fences (defaults baked into the image); override in .env to
# relax (empty = unrestricted) or move them.
- TALKPIPE_VAULT_ROOT=${TALKPIPE_VAULT_ROOT-/app/data}
- TALKPIPE_DOCUMENT_ROOTS=${TALKPIPE_DOCUMENT_ROOTS-/documents}
- PYTHONUNBUFFERED=1
restart: unless-stopped
healthcheck:
test: ["CMD", "python3", "-c", "import talkpipe_vault; print('OK')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
extra_hosts:
- "host.containers.internal:host-gateway"
networks:
- talkpipe-vault-network
vault-dev:
build:
context: .
dockerfile: Containerfile
image: ${IMAGE_NAME:-talkpipe-vault}:dev
container_name: talkpipe-vault-dev
ports:
- "${VAULT_PORT:-8002}:8002"
volumes:
- .:/workspace:Z
- talkpipe_vault_dev_data:/app/data
- talkpipe_vault_dev_cache:/home/vault/.cache
- ${VAULT_DOCUMENTS_DIR:-~/Documents}:/documents:ro
environment:
- VAULT_HOST=0.0.0.0
- VAULT_PORT=8002
# LanceDB path (same semantics as makevectordatabase --path).
# Whoosh index is created under VAULT_PATH/fulltext_vault.
- VAULT_PATH=/app/data/vault
# Persist web-interface settings (recent vaults, model choices) in the data volume
- TALKPIPE_VAULT_HOME=/app/data/vault-home
- TALKPIPE_OLLAMA_SERVER_URL=${TALKPIPE_OLLAMA_SERVER_URL:-http://host.containers.internal:11434}
# No auto-detection here: vault-dev overrides the entrypoint, so set
# HF_HUB_OFFLINE explicitly in .env when huggingface.co is unreachable.
- HF_HUB_OFFLINE=${HF_HUB_OFFLINE:-}
- TALKPIPE_VAULT_ROOT=${TALKPIPE_VAULT_ROOT-/app/data}
- TALKPIPE_DOCUMENT_ROOTS=${TALKPIPE_DOCUMENT_ROOTS-/documents}
- PYTHONUNBUFFERED=1
working_dir: /workspace
entrypoint: ["/bin/bash", "-lc"]
# Single-element list so the whole script reaches `bash -lc` as one argument
# (a plain string would be word-split by compose).
command:
- >-
python3 -m pip install --user -e '.[dev]' &&
vault-server --resume --host "$${VAULT_HOST}" --port "$${VAULT_PORT}" --no-browser
extra_hosts:
- "host.containers.internal:host-gateway"
networks:
- talkpipe-vault-network
profiles:
- dev
volumes:
talkpipe_vault_data:
driver: local
talkpipe_vault_dev_data:
driver: local
talkpipe_vault_dev_cache:
driver: local
networks:
talkpipe-vault-network:
driver: bridge