-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
55 lines (51 loc) · 1.15 KB
/
docker-compose.yaml
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
version: '3.9'
services:
postgres:
build:
context: ./postgres
dockerfile: Dockerfile.postgres
container_name: chat_postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
api:
build:
context: .
dockerfile: Dockerfile.api
container_name: chat_api
volumes:
- .:/chatbot
ports:
- "8000:8000"
depends_on:
- postgres
command: python chatbot/manage.py runserver 0.0.0.0:8000
env_file:
- .env
restart: always
llama:
build:
context: .
dockerfile: Dockerfile.llama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
- ollama:/root/.ollama # Correctly formatted as an array
container_name: ollama_llama
restart: always
ports:
- "11434:11434"
environment:
- MODEL=llama-3.1-7b
command: ["serve"] # Make sure to use the correct command format
volumes:
postgres_data:
ollama: