-
Notifications
You must be signed in to change notification settings - Fork 324
/
docker-compose.yml
43 lines (40 loc) · 1.78 KB
/
docker-compose.yml
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
x-gpu-enabled: &gpu-enabled
devices:
- driver: nvidia
count: all
capabilities:
- gpu # Enables GPU access for the container.
x-gpu-disabled: &gpu-disabled
devices: [] # Disables GPU access (default for systems without an NVIDIA GPU).
services:
ebook2audiobookxtts:
image: athomasson2/ebook2audiobook
platform: linux/amd64
tty: true
stdin_open: true
ports:
- 7860:7860 # Maps container's port 7860 to the host's port 7860.
command: python app.py
deploy:
resources:
reservations:
<<: *gpu-disabled # Use *gpu-enabled if you have an NVIDIA GPU.
# --- CPU Memory (RAM) Reservation ---
# memory: 4g # Uncomment to reserve 4GB of system RAM (minimum required by the container).
# --- GPU VRAM (Indirect Control) ---
# devices: # Uncomment and configure to limit GPU VRAM (requires GPU-enabled above).
# - driver: nvidia
# count: 1 # Use fractional GPU count (e.g., 0.5) to indirectly limit VRAM.
# capabilities:
# - gpu
limits:
# --- CPU Memory (RAM) Limit ---
# memory: 4g # Uncomment to set a 4GB upper limit on system RAM usage by the container.
volumes: []
# - ./:/home/user/app # Uncomment to map the local directory to the container.
# Additional Notes:
# - "CPU Memory (RAM)" refers to the system RAM used by the container.
# - "GPU VRAM" refers to the graphics memory allocated to the container's GPU tasks.
# - To enable GPU VRAM limits, ensure the NVIDIA Docker runtime is installed and active.
# - The `memory` options (RAM) use units like 'm' (megabytes) or 'g' (gigabytes).
# - The `count` parameter for GPU limits controls how much of the GPU (and indirectly VRAM) is accessible.