-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
101 lines (95 loc) · 2.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
101 lines (95 loc) · 2.17 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
services:
# Base image for the application
# This image is used to build the other services
# and contains the common dependencies
base:
build:
context: .
dockerfile: Dockerfile.base
image: rag-base-image
# FastAPI application
api:
build:
context: .
dockerfile: api/Dockerfile
ports:
- "8000:80"
depends_on:
- ollama
- qdrant
- base
environment:
- LLM_URL=http://ollama:11434
- LLM_NAME=research_assistant
- EMBEDDING_MODEL=sentence-transformers/all-mpnet-base-v2
- QDRANT_URL=http://qdrant:6333
- COLLECTION_NAME=researchpapers
- CHUNK_SIZE=1024
restart: always
networks:
- rag-network
volumes:
- ./api:/api
# Data ingestion CLI tool
data_ingestion:
build:
context: .
dockerfile: data/Dockerfile
profiles: ["data-ingest"]
depends_on:
- ollama
- qdrant
entrypoint: ["python", "data.py"]
environment:
- DATA_PATH=papers/
- LLM_URL=http://ollama:11434
- LLM_NAME=research_assistant
- EMBEDDING_MODEL=sentence-transformers/all-mpnet-base-v2
- QDRANT_URL=http://qdrant:6333
- COLLECTION_NAME=researchpapers
- CHUNK_SIZE=1024
networks:
- rag-network
volumes:
- ./papers:/app/papers
# Qdrant vector database
qdrant:
image: qdrant/qdrant
ports:
- "6333:6333"
volumes:
- ~/qdrant_storage:/qdrant/storage:z
networks:
- rag-network
# Ollama for LLM serving
ollama:
image: ollama/ollama:latest
pull_policy: always
container_name: ollama
volumes:
- ./ollama:/model_files
- ./ollama:/root/.ollama
tty: true
entrypoint: ["/bin/sh", "./model_files/run_ollama.sh"]
environment:
- LLM_NAME=research_assistant
restart: always
extra_hosts:
- host.docker.internal:host-gateway
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ports:
- "11434:11434"
networks:
- rag-network
networks:
rag-network:
driver: bridge
volumes:
qdrant_storage:
ollama: