docker-compose.comfyui-gpu-devices.yml
Rama main · réplica de lectura del repositorio original.
# GPU pinning override for ComfyUI (NVIDIA only).
#
# This file is included automatically by the stack's scripts when
# COMFYUI_GPU_DEVICES is set to a non-empty value in .env
# (and the comfyui-nvidia profile is active) (for example
# COMFYUI_GPU_DEVICES=0). It replaces the count-based GPU reservation of the
# comfyui-nvidia service with an explicit list of GPU device IDs, so ComfyUI
# only sees the listed GPUs. When COMFYUI_GPU_DEVICES is empty, this file is
# not used and COMFYUI_GPU_COUNT keeps working as before.
#
# Requires Docker Compose v2.24.4+ (for the !override tag).
services:
comfyui-nvidia:
deploy:
resources:
reservations:
devices: !override
- driver: nvidia
device_ids: ["${COMFYUI_GPU_DEVICES:?set COMFYUI_GPU_DEVICES in .env, e.g. 0}"]
capabilities: [gpu]