Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
133 lines (127 loc) · 5.05 KB
/
Copy pathcompose.yaml
File metadata and controls
133 lines (127 loc) · 5.05 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
services:
# Uncomment the following block to use a PostgreSQL database
# don't forget to also uncomment 'depends_on' 'db' section in the rhdh service
# and comment out or delete 'database' section in app-config.yaml or app-config.local.yaml
# db:
# container_name: db
# image: "registry.redhat.io/rhel8/postgresql-16:latest"
# volumes:
# - "/var/lib/pgsql/data"
# env_file:
# - path: "./default.env"
# required: true
# - path: "./.env"
# required: false
# healthcheck:
# test: ["CMD", "pg_isready", "-U", "postgres"]
# interval: 5s
# timeout: 5s
# retries: 5
rhdh:
container_name: rhdh
image: ${RHDH_IMAGE:-quay.io/rhdh-community/rhdh:1.10.6}
env_file:
- path: "./default.env"
required: true
- path: "./.env"
required: false
user: "1001"
entrypoint:
- "/opt/app-root/src/wait-for-plugins-and-start.sh"
ports: # dclint disable-line no-unbound-port-interfaces
- "7007:7007"
- "127.0.0.1:9229:9229"
environment:
NODE_OPTIONS: "--inspect=0.0.0.0:9229 --no-node-snapshot"
volumes:
# TechDocs source files are bind-mounted read-only and copied to a writable
# in-container workdir on startup
- ./mkdocs.yaml:/opt/app-root/src/techdocs-source/mkdocs.yaml:ro,z
- ./docs:/opt/app-root/src/techdocs-source/docs:ro,z
- ./catalog-info.yaml:/opt/app-root/src/techdocs-source/catalog-info.yaml:ro,z
- ./wait-for-plugins-and-start.sh:/opt/app-root/src/wait-for-plugins-and-start.sh:Z
- ./configs:/opt/app-root/src/configs:z
- dynamic-plugins-root:/opt/app-root/src/dynamic-plugins-root
- extensions-catalog:/extensions
depends_on:
install-dynamic-plugins:
condition: service_completed_successfully
# db:
# condition: service_healthy
install-dynamic-plugins:
container_name: rhdh-plugins-installer
image: ${RHDH_IMAGE:-quay.io/rhdh-community/rhdh:1.10.6}
# docker compose volumes are owned by root, so we need to run as root to write to them
# the main rhdh container will be able to read from this as files are world readable
user: "root"
entrypoint:
- ./prepare-and-install-dynamic-plugins.sh
env_file:
- path: "./default.env"
required: true
- path: "./.env"
required: false
volumes:
- ./prepare-and-install-dynamic-plugins.sh:/opt/app-root/src/prepare-and-install-dynamic-plugins.sh:Z
- ./local-plugins:/opt/app-root/src/local-plugins:Z
- ./configs:/opt/app-root/src/configs:z
- dynamic-plugins-root:/dynamic-plugins-root
- extensions-catalog:${CATALOG_ENTITIES_EXTRACT_DIR:-/extensions}
# RAG initialization service: Copies RAG embeddings and vector database to shared volumes
# This runs once at startup to prepare the RAG data for the lightspeed-core container
rag-init:
image: 'quay.io/redhat-ai-dev/rag-content:release-1.10-lls-0.5.0-8c231a3b5177f12fff9db042dfa4091d8f2f26b3'
container_name: rag-init
user: "root"
volumes:
- rag_embeddings:/data/embeddings_model
- rag_vector_db:/data/vector_db
entrypoint: [ "/bin/sh", "-c" ]
command: |
"set -e; echo 'Copying RAG data...' && \
mkdir -p /data/vector_db /data/embeddings_model && \
cp -r /rag/vector_db/* /data/vector_db/ && \
cp -r /rag/embeddings_model/* /data/embeddings_model/ && \
chown -R 1001:0 /data/vector_db /data/embeddings_model || true && \
chmod -R a+rwX /data/vector_db /data/embeddings_model && \
echo 'Copy complete.'"
restart: "no"
# Lightspeed Core Service (Library Mode)
# Runs both Lightspeed Core and Llama Stack in a single container
# Default image: quay.io/lightspeed-core/lightspeed-stack:0.5.1
# To override: Set LIGHTSPEED_CORE_IMAGE in your .env file
lightspeed-core:
image: ${LIGHTSPEED_CORE_IMAGE:-quay.io/lightspeed-core/lightspeed-stack:0.6.4} # dclint disable-line service-image-require-explicit-tag
container_name: lightspeed-core
network_mode: "service:rhdh"
depends_on:
rhdh:
condition: service_started
rag-init:
condition: service_completed_successfully
volumes:
- ./configs/extra-files/lightspeed-stack.yaml:/app-root/lightspeed-stack.yaml:Z
- ./configs/extra-files/rhdh-profile.py:/app-root/rhdh-profile.py:Z
- ./configs/extra-files/config.yaml:/app-root/config.yaml:Z
- rag_embeddings:/rag-content/embeddings_model
- rag_vector_db:/rag-content/vector_db
- ${VERTEX_AI_CREDENTIALS_PATH:-./configs/extra-files/templates/placeholder.json}:/app-root/credentials.json:Z
environment:
GOOGLE_APPLICATION_CREDENTIALS: /app-root/credentials.json
SERVICE_HOST: 0.0.0.0
env_file:
- path: "./default.env"
required: true
- path: "./.env"
required: false
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:8080/readiness"]
interval: 5s
timeout: 3s
retries: 20
start_period: 10s
volumes:
dynamic-plugins-root:
extensions-catalog:
rag_embeddings:
rag_vector_db: