Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +69 -0
Dockerfile
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
WORKDIR /content
|
4 |
+
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
ENV PYTHONUNBUFFERED=True
|
7 |
+
ENV PATH="/home/camenduru/.local/bin:/usr/local/cuda/bin:${PATH}"
|
8 |
+
|
9 |
+
RUN apt update -y && apt install -y software-properties-common build-essential \
|
10 |
+
libgl1 libglib2.0-0 zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev && \
|
11 |
+
add-apt-repository -y ppa:git-core/ppa && apt update -y && \
|
12 |
+
apt install -y python-is-python3 python3-pip sudo nano aria2 curl wget git git-lfs unzip unrar ffmpeg && \
|
13 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.35.03_linux.run -d /content -o cuda_12.6.2_560.35.03_linux.run && sh cuda_12.6.2_560.35.03_linux.run --silent --toolkit && \
|
14 |
+
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf && ldconfig && \
|
15 |
+
git clone https://github.com/aristocratos/btop /content/btop && cd /content/btop && make && make install && \
|
16 |
+
adduser --disabled-password --gecos '' camenduru && \
|
17 |
+
adduser camenduru sudo && \
|
18 |
+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
19 |
+
chown -R camenduru:camenduru /content && \
|
20 |
+
chmod -R 777 /content && \
|
21 |
+
chown -R camenduru:camenduru /home && \
|
22 |
+
chmod -R 777 /home
|
23 |
+
|
24 |
+
USER camenduru
|
25 |
+
|
26 |
+
RUN pip install torch==2.5.1+cu124 torchvision==0.20.1+cu124 torchaudio==2.5.1+cu124 torchtext==0.18.0 torchdata==0.8.0 --extra-index-url https://download.pytorch.org/whl/cu124 && \
|
27 |
+
pip install xformers==0.0.28.post3 && \
|
28 |
+
pip install opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod && \
|
29 |
+
pip install torchsde einops diffusers transformers accelerate peft timm kornia scikit-image matplotlib && \
|
30 |
+
git clone https://github.com/comfyanonymous/ComfyUI /content/ComfyUI && \
|
31 |
+
git clone https://github.com/ltdrdata/ComfyUI-Manager /content/ComfyUI/custom_nodes/ComfyUI-Manager && \
|
32 |
+
git clone https://github.com/sipherxyz/comfyui-art-venture /content/ComfyUI/custom_nodes/comfyui-art-venture && \
|
33 |
+
git clone https://github.com/chflame163/ComfyUI_LayerStyle /content/ComfyUI/custom_nodes/ComfyUI_LayerStyle && \
|
34 |
+
git clone https://github.com/cubiq/ComfyUI_essentials /content/ComfyUI/custom_nodes/ComfyUI_essentials && \
|
35 |
+
git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet /content/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet && \
|
36 |
+
git clone -b dev https://github.com/camenduru/ComfyUI_SLK_joy_caption_two /content/ComfyUI/custom_nodes/ComfyUI_SLK_joy_caption_two && \
|
37 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/misri/leosamsHelloworldXL_helloworldXL70/resolve/main/leosamsHelloworldXL_helloworldXL70.safetensors -d /content/ComfyUI/models/checkpoints/sdxl -o leosamsHelloworldXL_helloworldXL70.safetensors && \
|
38 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/alvdansen/midsommarcartoon/resolve/main/araminta_k_midsommar_cartoon.safetensors -d /content/ComfyUI/models/loras/sdxl -o araminta_k_midsommar_cartoon.safetensors && \
|
39 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/4spaces/controlnet-union-sdxl-1.0-promax/resolve/main/diffusion_pytorch_model.fp16.safetensors -d /content/ComfyUI/models/controlnet/sdxl -o controlnet-union-sdxl-1.0-promax.safetensors && \
|
40 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/yiwangsimple/BiRefNet-general-epoch_244/resolve/main/BiRefNet-general-epoch_244.pth -d /content/ComfyUI/models/BiRefNet/pth -o BiRefNet-general-epoch_244.pth && \
|
41 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/config.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o config.json && \
|
42 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/generation_config.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o generation_config.json && \
|
43 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/resolve/main/model-00001-of-00004.safetensors -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o model-00001-of-00004.safetensors && \
|
44 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/resolve/main/model-00002-of-00004.safetensors -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o model-00002-of-00004.safetensors && \
|
45 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/resolve/main/model-00003-of-00004.safetensors -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o model-00003-of-00004.safetensors && \
|
46 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/resolve/main/model-00004-of-00004.safetensors -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o model-00004-of-00004.safetensors && \
|
47 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/model.safetensors.index.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o model.safetensors.index.json && \
|
48 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/special_tokens_map.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o special_tokens_map.json && \
|
49 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/tokenizer.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o tokenizer.json && \
|
50 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2/raw/main/tokenizer_config.json -d /content/ComfyUI/models/LLM/Orenguteng--Llama-3.1-8B-Lexi-Uncensored-V2 -o tokenizer_config.json && \
|
51 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/raw/main/config.json -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o config.json && \
|
52 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/resolve/main/model.safetensors -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o model.safetensors && \
|
53 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/raw/main/preprocessor_config.json -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o preprocessor_config.json && \
|
54 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/raw/main/special_tokens_map.json -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o special_tokens_map.json && \
|
55 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/resolve/main/spiece.model -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o spiece.model && \
|
56 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/raw/main/tokenizer.json -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o tokenizer.json && \
|
57 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/google/siglip-so400m-patch14-384/raw/main/tokenizer_config.json -d /content/ComfyUI/models/clip/siglip-so400m-patch14-384 -o tokenizer_config.json && \
|
58 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/resolve/main/image_adapter.pt -d /content/ComfyUI/models/Joy_caption_two -o image_adapter.pt && \
|
59 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/raw/main/config.yaml -d /content/ComfyUI/models/Joy_caption_two -o config.yaml && \
|
60 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/resolve/main/clip_model.pt -d /content/ComfyUI/models/Joy_caption_two -o clip_model.pt && \
|
61 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/raw/main/text_model/tokenizer_config.json -d /content/ComfyUI/models/Joy_caption_two/text_model -o tokenizer_config.json && \
|
62 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/raw/main/text_model/tokenizer.json -d /content/ComfyUI/models/Joy_caption_two/text_model -o tokenizer.json && \
|
63 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/raw/main/text_model/special_tokens_map.json -d /content/ComfyUI/models/Joy_caption_two/text_model -o special_tokens_map.json && \
|
64 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/resolve/main/text_model/adapter_model.safetensors -d /content/ComfyUI/models/Joy_caption_two/text_model -o adapter_model.safetensors && \
|
65 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/joy-caption-alpha-two/raw/main/text_model/adapter_config.json -d /content/ComfyUI/models/Joy_caption_two/text_model -o adapter_config.json
|
66 |
+
|
67 |
+
COPY ./worker_runpod.py /content/ComfyUI/worker_runpod.py
|
68 |
+
WORKDIR /content/ComfyUI
|
69 |
+
CMD python worker_runpod.py
|