FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 RUN apt-get update && apt-get install -y git && apt-get clean ENV ROOT=/stable-diffusion RUN --mount=type=cache,target=/root/.cache/pip \ git clone -b v0.3.10 --depth=1 https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \ cd ${ROOT} && \ pip install -r requirements.txt RUN git clone -b 3.6.5 --depth=1 https://github.com/ltdrdata/ComfyUI-Manager ${ROOT}/custom_nodes/comfyui-manager && \ pip install -r ${ROOT}/custom_nodes/comfyui-manager/requirements.txt WORKDIR ${ROOT} COPY . /docker/ RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml ${ROOT} ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS="" EXPOSE 7860 ENTRYPOINT ["/docker/entrypoint.sh"] CMD python -u main.py --listen --port 7860 ${CLI_ARGS}