-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (68 loc) · 1.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (68 loc) · 1.94 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
x-common-volumes: &common-volumes
- ./:/MoneyPrinterTurbo
# GPU support: use with `docker compose --profile gpu up`
# CPU only (default): `docker compose up`
services:
webui:
build:
context: .
dockerfile: Dockerfile
container_name: "moneyprinterturbo-webui"
ports:
- "8501:8501"
command: [ "streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False" ]
volumes: *common-volumes
restart: always
api:
build:
context: .
dockerfile: Dockerfile
container_name: "moneyprinterturbo-api"
ports:
- "8080:8080"
command: [ "python3", "main.py" ]
volumes: *common-volumes
restart: always
# ---- GPU-enabled services (use: docker compose --profile gpu up) ----
webui-gpu:
build:
context: .
dockerfile: Dockerfile
container_name: "moneyprinterturbo-webui-gpu"
profiles: ["gpu"]
ports:
- "8501:8501"
command: [ "streamlit", "run", "./webui/Main.py","--browser.serverAddress=127.0.0.1","--server.enableCORS=True","--browser.gatherUsageStats=False" ]
volumes: *common-volumes
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
api-gpu:
build:
context: .
dockerfile: Dockerfile
container_name: "moneyprinterturbo-api-gpu"
profiles: ["gpu"]
ports:
- "8080:8080"
command: [ "python3", "main.py" ]
volumes: *common-volumes
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility