ComfyUI/comfyui.yaml
2025-02-27 17:18:40 +08:00

42 lines
930 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 配置docker配置文件启用gpu
#{
# "runtimes": {
# "nvidia": {
# "args": [],
# "path": "nvidia-container-runtime"
# }
# }
#}
# 打包启动镜像命令docker compose build up -d
version: '1'
services:
app:
build: .
container_name: comfyui
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
volumes:
- .:/app
- ./app/models/Stable-diffusion:/app/models/Stable-diffusion # 绑定模型目录
ports:
- "8188:8188" # 如果你的应用需要暴露端口
command: python main.py # 启动 main.py 文件
environment:
- PYTHONUNBUFFERED=1 # 确保输出不会被缓冲
working_dir: /app
restart: always
networks:
- my_custom_network
networks:
my_custom_network:
name: comfyui