ComfyUI-docker/Dockerfile

44 lines
918 B
Docker
Raw Normal View History

2024-10-12 23:27:14 +00:00
FROM nvidia/cuda:12.6.1-cudnn-runtime-ubuntu20.04
RUN apt-get update && apt-get install -y \
git \
python3 \
python3-pip \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/comfyanonymous/ComfyUI.git /ComfyUI
WORKDIR /ComfyUI
2024-10-12 23:28:25 +00:00
VOLUME [ \
2024-10-21 17:49:35 +00:00
"/ComfyUI/models", \
2024-10-14 22:44:17 +00:00
"/ComfyUI/input", \
2024-10-21 17:49:35 +00:00
"/ComfyUI/output", \
"/ComfyUI/custom_nodes", \
"/ComfyUI/my_workflows", \
"/ComfyUI_temp" \
]
2024-10-12 23:27:14 +00:00
RUN pip3 install --upgrade pip \
&& pip3 install -r requirements.txt
ENV PATH /usr/local/cuda/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64:${LD_LIBRARY_PATH}
2024-10-21 17:49:35 +00:00
COPY ./cmd.sh /
RUN chmod +x /cmd.sh
COPY ./nodes_download.bash /
RUN bash /nodes_download.bash
2024-10-21 17:49:35 +00:00
RUN cp -TR "/ComfyUI/models" /tmp_models
RUN cp -TR "/ComfyUI/input" /tmp_input
RUN cp -TR "/ComfyUI/output" /tmp_output
RUN cp -TR "/ComfyUI/custom_nodes" /tmp_custom_nodes
CMD /cmd.sh