-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-gpu.yml
More file actions
50 lines (48 loc) · 1.55 KB
/
docker-compose-gpu.yml
File metadata and controls
50 lines (48 loc) · 1.55 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
# docker-compose.yml
version: '3.8'
services:
# Backend API service
backend:
# Specifies that Docker Compose should build the image from the Dockerfile
# in the current directory.
build: .
# Names the image that will be built.
image: agentos-backend
# Forwards the exposed port 8000 on the container to port 8000 on the host machine.
# This makes the application accessible at http://localhost:8000.
ports:
- "8000:8000"
# Sets environment variables inside the container.
# It's recommended to use a .env file for sensitive data like API keys.
env_file:
- .env
# Sets the restart policy. "unless-stopped" ensures the container restarts
# automatically unless you manually stop it.
restart: unless-stopped
# Mounts the local ./qa_log.log file into the container at /app/qa_log.log.
# This ensures that your logs are persisted on your host machine even if the
# container is removed.
volumes:
- ./qa_log.log:/app/qa_log.log
- ./ideal_contract_templates:/app/ideal_contract_templates
- ./chroma_db:/app/chroma_db
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # or specify a number, e.g., 1
capabilities: [ gpu ]
# Frontend service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: agentos-frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://backend:8000
restart: unless-stopped
depends_on:
- backend