返回 MoneyPrinterTurbo
docker-compose.gpu.yml
根目录 / docker-compose.gpu.yml
1 # GPU override file
2 # Usage: docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
3 #
4 # Prerequisites:
5 # 1. NVIDIA GPU driver installed on host
6 # 2. NVIDIA Container Toolkit installed
7 # 3. Verify with: docker info | grep nvidia
8 #
9 # This file overrides the default docker-compose.yml to:
10 # - Build with Dockerfile.gpu (NVIDIA CUDA base image)
11 # - Attach GPU device to the api service
12 services:
13 webui:
14 build:
15 context: .
16 dockerfile: Dockerfile.gpu
17 api:
18 build:
19 context: .
20 dockerfile: Dockerfile.gpu
21 deploy:
22 resources:
23 reservations:
24 devices:
25 - driver: nvidia
26 count: 1
27 capabilities: [gpu]
28
28 lines YAML