mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-01 12:57:11 +08:00
26 lines
1.3 KiB
YAML
26 lines
1.3 KiB
YAML
services:
|
|
comfyui_backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: comfyui-red-image
|
|
container_name: comfyui-red-container
|
|
ports:
|
|
- "8188:8188" # Expose the backend API or server
|
|
volumes:
|
|
- ./input:/app/comfyui/input # Mount the input directory directly inside /app/comfyui
|
|
- ./models:/app/comfyui/models # Mount the models directory directly inside /app/comfyui
|
|
- ./output:/app/comfyui/output # Mount the output directory directly inside /app/comfyui
|
|
- ./custom_nodes:/app/comfyui/custom_nodes # Mount the custom nodes directory directly inside /app/comfyui
|
|
- ./user:/app/comfyui/user # Comment this line and uncomment the next line if you want to have a workflows directory in the root directory.
|
|
#- ./workflows:/app/comfyui/user/default/workflows
|
|
|
|
# Mount the venv directory for persistence(automatically mounted with you run docker-build.sh)
|
|
|
|
|
|
environment:
|
|
- DISPLAY=${DISPLAY} # Optional, for X11 display forwarding (if you use it)
|
|
- NVIDIA_VISIBLE_DEVICES=all # Ensure NVIDIA GPU is available to the container
|
|
- NVIDIA_DRIVER_CAPABILITIES=all # For CUDA support
|
|
runtime: nvidia # Use the NVIDIA runtime for GPU support
|
|
restart: "no" #change to "always" if you want to restart the container |