ComfyUI-XL-Vae-Public / Dockerfile
vorstcavry's picture
Update Dockerfile
97ffd4a
raw
history blame
No virus
4.24 kB
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
# User
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Pyenv
RUN curl https://pyenv.run | bash
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
ARG PYTHON_VERSION=3.9.17
# Python
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
# Set the working directory to /data if USE_PERSISTENT_DATA is set, otherwise set to $HOME/app
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
RUN git clone https://github.com/comfyanonymous/ComfyUI . && \
pip install --no-cache-dir -r requirements.txt
# Checkpoints
RUN echo "Downloading checkpoints..." && \
# Kybalico Models
#wget -c https://huggingface.co/Kybalico/CandyApple/resolve/main/candyApple_v12.safetensors -P ./models/checkpoints/ && \
#wget -c https://huggingface.co/Kybalico/CalicoMix/resolve/main/calicomix_v30.safetensors -P ./models/checkpoints/ && \
#wget -c https://huggingface.co/Kybalico/CalicoMix/resolve/main/calicoMix_v75.safetensors -P ./models/checkpoints/ && \
#wget -c https://huggingface.co/Kybalico/CalicoMixDC/resolve/main/calicomix_dcV30.safetensors -P ./models/checkpoints/ && \
#wget -c https://huggingface.co/Kybalico/AnmitsuMimimi/resolve/main/anmitsuMimimi_v10.safetensors -P ./models/checkpoints/ && \
#ReedMixs Models
#wget -c https://huggingface.co/P01yH3dr0n/ReedMix/resolve/main/ReedMix_A.ckpt -P ./models/checkpoints/ && \
#Anything Models
#wget -c https://huggingface.co/jackson885/anything-v5-PrtRE/resolve/main/anything-v5-PrtRE.safetensors -P ./models/checkpoints/ && \
#Nocrypt Model
wget -c https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/SomethingV2_2.safetensors -P ./models/checkpoints/ && \
#XL
#wget -c https://huggingface.co/Linaqruf/animagine-xl/resolve/main/animagine-xl.safetensors -P ./models/checkpoints/ && \
# VAE
#wget -c https://huggingface.co/theboylzh/ClearVAE/resolve/main/ClearVAE_V2.2.safetensors -P ./models/vae/ && \
#wget -c https://huggingface.co/Linaqruf/animagine-xl/resolve/main/vae/diffusion_pytorch_model.safetensors -P ./models/vae/ && \
# Loras
#wget -c https://huggingface.co/qewadszcx132/hyperbreasts/resolve/main/hyperbreasts_v4.ckpt -P ./models/loras/ && \
#wget -c https://huggingface.co/Osmond141319/Hyperfusion/resolve/main/hyperfusion_279k_64dim_LoCon_v6.safetensors -P ./models/loras/ && \
# ControlNet
#wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors -P ./models/controlnet/ && \
# Controlnet Preprocessor nodes by Fannovel16
#cd custom_nodes && git clone https://github.com/Fannovel16/comfy_controlnet_preprocessors && cd comfy_controlnet_preprocessors && python install.py --no_download_ckpts && cd ../../ && \
# GLIGEN
# wget -c https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/resolve/main/gligen_sd14_textbox_pruned_fp16.safetensors -P ./models/gligen/ && \
# ESRGAN upscale model
wget -c https://huggingface.co/konohashinobi4/4xAnimesharp/resolve/main/4x-AnimeSharp.pth -P ./models/upscale_models/ && \
echo "Done"
CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"]