-
Notifications
You must be signed in to change notification settings - Fork 1
/
dockerfile-simple
57 lines (42 loc) · 2.48 KB
/
dockerfile-simple
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM nvcr.io/nvidia/pytorch:23.05-py3
RUN mkdir -p /opt/program
RUN chmod 777 /opt/program
#FROM public.ecr.aws/o7x6j3x6/sd-dreambooth-finetuning-v2
RUN pip install --no-cache-dir fastapi uvicorn sagemaker
RUN pip install sagemaker-ssh-helper
RUN curl -L https://github.com/peak/s5cmd/releases/download/v2.2.2/s5cmd_2.2.2_Linux-64bit.tar.gz | tar -xz && mv s5cmd /opt/program/
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
ENV PATH="/opt/program:${PATH}"
####install ComfyUI
COPY ComfyUI /opt/program
RUN pip install -r /opt/program/requirements.txt
####upgrade torch/torchversion/cuda121 relevant dependence
#RUN pip install torch torchvision --upgrade --index-url https://download.pytorch.org/whl/cu121
RUN pip install -U xformers
RUN pip install scikit-image
RUN pip install imageio_ffmpeg
#RUN apt install net-tools
###download relevant models
RUN wget https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt/resolve/main/svd_xt.safetensors
RUN wget https://huggingface.co/nergaldarski/CardosAnimeV2.0/resolve/main/cardosAnime_v20.safetensors
RUN wget https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15.ckpt
RUN wget https://huggingface.co/mmmoof1/vae-ft-mse-840000-ema-pruned/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors
RUN wget https://huggingface.co/latent-consistency/lcm-lora-sdv1-5/resolve/main/pytorch_lora_weights.safetensors
RUN mv ./pytorch_lora_weights.safetensors /opt/program/models/loras/
RUN mv ./vae*.safetensors /opt/program/models/vae/
RUN mv ./*.safetensors /opt/program/models/checkpoints/
###install relevant ComfyUI nodes
RUN git clone https://github.com/ltdrdata/ComfyUI-Manager.git /opt/program/custom_nodes/ComfyUI-Manager
RUN git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git /opt/program/custom_nodes/ComfyUI-AnimateDiff-Evolved
RUN mv ./mm_sd*.ckpt /opt/program/custom_nodes/ComfyUI-AnimateDiff-Evolved/models/
RUN git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git /opt/program/custom_nodes/ComfyUI-Advanced-ControlNet
RUN git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git /opt/program/custom_nodes/comfyui_controlnet_aux
RUN git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git /opt/program/custom_nodes/ComfyUI-VideoHelperSuite
####install relevant http/socket client(for unicorn web server)
RUN pip3 install websocket-client
RUN pip3 install pydantic
#####start comfyui
RUN chmod 755 /opt/program
RUN chmod 755 /opt/program/serve
WORKDIR /opt/program