stable-diffusion-webui-docker/services/comfy/Dockerfile

25 lines
898 B
Docker
Raw Normal View History

2024-05-02 06:05:13 +02:00
# FROM pytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtime
FROM rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
2024-05-02 14:05:57 +02:00
RUN apt-get update && apt-get install -y git cargo nasm && apt-get clean
ENV ROOT=/stable-diffusion
2024-05-02 06:05:13 +02:00
RUN --mount=type=cache,target=/root/.cache/pip,Z \
2024-05-02 14:05:57 +02:00
git clone --recursive https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \
cd ${ROOT} && \
git checkout master && \
2024-05-02 14:05:57 +02:00
# git reset --hard d1f3637a5a944d0607b899babd8ff11d87100503 && \
pip install -r requirements.txt
WORKDIR ${ROOT}
COPY . /docker/
RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml ${ROOT}
2024-05-02 06:05:13 +02:00
# ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
ENV PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
EXPOSE 7860
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD python -u main.py --listen --port 7860 ${CLI_ARGS}