mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-12 04:40:03 +08:00
Added minimal Dockerfiles and docker-compose.yaml
Did not test Nvidia setup
This commit is contained in:
parent
5a69f84c3c
commit
9093e85009
17
AMD.Dockerfile
Normal file
17
AMD.Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:3.12.5-bookworm
|
||||
|
||||
RUN pip install jinja2 numpy
|
||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0
|
||||
#RUN pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.1
|
||||
RUN apt update -y
|
||||
RUN apt install -y git
|
||||
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
|
||||
RUN apt install -y cargo cmake g++ gcc python3-dev musl-dev make nasm
|
||||
RUN pip install -r /ComfyUI/requirements.txt
|
||||
|
||||
RUN apt remove -y git cargo cmake g++ gcc python3-dev musl-dev make nasm
|
||||
RUN apt autoremove -y && apt clean -y
|
||||
|
||||
RUN chmod +x /ComfyUI/main.py
|
||||
|
||||
ENTRYPOINT ["python", "/ComfyUI/main.py", "--listen"]
|
||||
17
NVIDIA.Dockerfile
Normal file
17
NVIDIA.Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM python:3.12.5-bookworm
|
||||
|
||||
RUN pip install jinja2 numpy
|
||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0
|
||||
#RUN pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
|
||||
RUN apt update -y
|
||||
RUN apt install -y git
|
||||
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
|
||||
RUN apt install -y cargo cmake g++ gcc python3-dev musl-dev make nasm
|
||||
RUN pip install -r /ComfyUI/requirements.txt
|
||||
|
||||
RUN apt remove -y git cargo cmake g++ gcc python3-dev musl-dev make nasm
|
||||
RUN apt autoremove -y && apt clean -y
|
||||
|
||||
RUN chmod +x /ComfyUI/main.py
|
||||
|
||||
ENTRYPOINT ["python", "/ComfyUI/main.py", "--listen"]
|
||||
27
docker-compose.yaml
Normal file
27
docker-compose.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
services:
|
||||
comfy-ui:
|
||||
build:
|
||||
context: ./
|
||||
# AMD Users uncomment:
|
||||
dockerfile: ./AMD.Dockerfile
|
||||
# NVIDIA Users uncomment:
|
||||
#dockerfile: ./NVIDIA.Dockerfile
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./models/checkpoints:/ComfyUI/models/checkpoints
|
||||
- ./models/vae:/ComfyUI/models/vae
|
||||
- ./models/unet:/ComfyUI/models/unet
|
||||
- ./models/clip:/ComfyUI/models/clip
|
||||
- $OUTPUTDIRECTORY:ComfyUI/output
|
||||
ports:
|
||||
- 8188:8188
|
||||
devices:
|
||||
- "/dev/dri:/dev/dri"
|
||||
## For AMD GPU
|
||||
- "/dev/kfd:/dev/kfd"
|
||||
healthcheck:
|
||||
test: curl --fail http://localhost:8188/ || exit
|
||||
interval: 40s
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
Loading…
x
Reference in New Issue
Block a user