Spaces:
Running
Running
File size: 711 Bytes
ffa5738 | 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 | # GPU override file
# Usage: docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
#
# Prerequisites:
# 1. NVIDIA GPU driver installed on host
# 2. NVIDIA Container Toolkit installed
# 3. Verify with: docker info | grep nvidia
#
# This file overrides the default docker-compose.yml to:
# - Build with Dockerfile.gpu (NVIDIA CUDA base image)
# - Attach GPU device to the api service
services:
webui:
build:
context: .
dockerfile: Dockerfile.gpu
api:
build:
context: .
dockerfile: Dockerfile.gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
|