FROM ubuntu:22.04 WORKDIR /content ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=True ENV PATH="/home/camenduru/.local/bin:/usr/local/cuda/bin:${PATH}" RUN apt update -y && apt install -y software-properties-common build-essential \ libgl1 libglib2.0-0 zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev && \ add-apt-repository -y ppa:git-core/ppa && apt update -y && \ apt install -y python-is-python3 python3-pip sudo nano aria2 curl wget git git-lfs unzip unrar ffmpeg && \ 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 && \ echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf && ldconfig && \ git clone https://github.com/aristocratos/btop /content/btop && cd /content/btop && make && make install && \ adduser --disabled-password --gecos '' camenduru && \ adduser camenduru sudo && \ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ chown -R camenduru:camenduru /content && \ chmod -R 777 /content && \ chown -R camenduru:camenduru /home && \ chmod -R 777 /home USER camenduru 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 && \ pip install xformers==0.0.28.post3 && \ pip install opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod && \ pip install torchsde einops diffusers transformers accelerate peft timm kornia scikit-image && \ git clone https://github.com/comfyanonymous/ComfyUI /content/ComfyUI && \ git clone https://github.com/ltdrdata/ComfyUI-Manager /content/ComfyUI/custom_nodes/ComfyUI-Manager && \ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/flux1-fill-dev.safetensors -d /content/ComfyUI/models/unet -o flux1-fill-dev.safetensors && \ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/clip_l.safetensors -d /content/ComfyUI/models/clip -o clip_l.safetensors && \ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/t5xxl_fp16.safetensors -d /content/ComfyUI/models/clip -o t5xxl_fp16.safetensors && \ aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/FLUX.1-dev/resolve/main/ae.sft -d /content/ComfyUI/models/vae -o ae.sft COPY ./worker_runpod.py /content/ComfyUI/worker_runpod.py WORKDIR /content/ComfyUI CMD python worker_runpod.py