camenduru commited on
Commit
bccd34f
1 Parent(s): 4f4d410

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +44 -0
Dockerfile ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0+cu124 torchvision==0.20.0+cu124 torchaudio==2.5.0+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.post2 https://github.com/camenduru/wheels/releases/download/torch-2.5.0-cu124/flash_attn-2.6.3-cp310-cp310-linux_x86_64.whl && \
28
+ pip install opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod && \
29
+ pip install torchsde einops diffusers transformers accelerate peft timm && \
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/smthemex/ComfyUI_InstantIR_Wrapper /content/ComfyUI/custom_nodes/ComfyUI_InstantIR_Wrapper && \
33
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/InstantX/InstantIR/resolve/main/models/adapter.pt -d /content/ComfyUI/models/InstantIR/models -o adapter.pt && \
34
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/InstantX/InstantIR/resolve/main/models/aggregator.pt -d /content/ComfyUI/models/InstantIR/models -o aggregator.pt && \
35
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/InstantX/InstantIR/resolve/main/models/previewer_lora_weights.bin -d /content/ComfyUI/models/InstantIR/models -o previewer_lora_weights.bin && \
36
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/dinov2-large/raw/main/config.json -d /content/ComfyUI/models/dinov2 -o config.json && \
37
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/dinov2-large/resolve/main/model.safetensors -d /content/ComfyUI/models/dinov2 -o model.safetensors && \
38
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/dinov2-large/raw/main/preprocessor_config.json -d /content/ComfyUI/models/dinov2 -o preprocessor_config.json && \
39
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/latent-consistency/lcm-lora-sdxl/resolve/main/pytorch_lora_weights.safetensors -d /content/ComfyUI/models/loras/sdxl/lcm -o pytorch_lora_weights.safetensors && \
40
+ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/ultralytics/resolve/main/dreamshaperXL_lightningDPMSDE.safetensors -d /content/ComfyUI/models/checkpoints -o dreamshaperXL_lightningDPMSDE.safetensors
41
+
42
+ COPY ./worker_runpod.py /content/ComfyUI/worker_runpod.py
43
+ WORKDIR /content/ComfyUI
44
+ CMD python worker_runpod.py