|
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 |
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \ |
|
TZ=America/Los_Angeles |
|
|
|
ARG USE_PERSISTENT_DATA |
|
|
|
RUN apt-get update && apt-get install -y \ |
|
git \ |
|
make build-essential libssl-dev zlib1g-dev \ |
|
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ |
|
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \ |
|
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \ |
|
&& rm -rf /var/lib/apt/lists/* \ |
|
&& git lfs install |
|
|
|
WORKDIR /code |
|
|
|
COPY ./requirements.txt /code/requirements.txt |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
USER user |
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
RUN curl https://pyenv.run | bash |
|
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH |
|
|
|
ARG PYTHON_VERSION=3.9.17 |
|
|
|
RUN pyenv install $PYTHON_VERSION && \ |
|
pyenv global $PYTHON_VERSION && \ |
|
pyenv rehash && \ |
|
pip install --no-cache-dir --upgrade pip setuptools wheel && \ |
|
pip install --no-cache-dir \ |
|
datasets \ |
|
huggingface-hub "protobuf<4" "click<8.1" |
|
|
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
RUN git clone https://github.com/comfyanonymous/ComfyUI . && \ |
|
pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN echo "Downloading checkpoints..." && \ |
|
|
|
|
|
wget -cq https://huggingface.co/Kybalico/CalicoMix/resolve/main/calicoMix_v75.safetensors -P ./models/checkpoints/ && \ |
|
|
|
|
|
|
|
|
|
wget -cq https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors -P ./models/checkpoints/ && \ |
|
|
|
|
|
wget -O ./models/loras/lcm-lora-sdv1-5.safetensors https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/resolve/main/pytorch_lora_weights.safetensors && \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \ |
|
|
|
|
|
echo "Installing custom nodes..." |
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN cd custom_nodes && git clone https://github.com/EllangoK/ComfyUI-post-processing-nodes --depth 1 |
|
RUN cd custom_nodes && git clone https://github.com/jags111/efficiency-nodes-comfyui --depth 1 |
|
RUN cd custom_nodes && git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes --depth 1 |
|
RUN cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack --depth 1 && cd ComfyUI-Impact-Pack && python install.py |
|
RUN cd custom_nodes && git clone https://github.com/crystian/ComfyUI-Crystools --depth 1 && pip install -r ./ComfyUI-Crystools/requirements.txt |
|
|
|
|
|
RUN echo "Done" |
|
|
|
CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"] |
|
|
|
|
|
|
|
|
|
|