Dockerfile 758 B

12345678910111213141516171819202122
  1. FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
  2. ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
  3. RUN apt-get update && apt-get install -y git && apt-get clean
  4. ENV ROOT=/stable-diffusion
  5. RUN --mount=type=cache,target=/root/.cache/pip \
  6. git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \
  7. cd ${ROOT} && \
  8. git checkout master && \
  9. git reset --hard 276f8fce9f5a80b500947fb5745a4dde9e84622d && \
  10. pip install -r requirements.txt
  11. WORKDIR ${ROOT}
  12. COPY . /docker/
  13. RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml ${ROOT}
  14. ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
  15. EXPOSE 7860
  16. ENTRYPOINT ["/docker/entrypoint.sh"]
  17. CMD python -u main.py --listen --port 7860 ${CLI_ARGS}