MattyAtHome/FluxD_Workflows
0
1FROM nvidia/cuda:12.1.1-runtime-ubuntu22.042 3ENV DEBIAN_FRONTEND=noninteractive4ENV PORT=78605 6# Install system dependencies including Git LFS7RUN apt-get update && apt-get install -y \8 git wget python3 python3-pip libgl1-mesa-glx libsm6 libxext6 libxrender-dev git-lfs && \9 ln -s /usr/bin/python3 /usr/bin/python && \10 git lfs install && \11 rm -rf /var/lib/apt/lists/*12 13WORKDIR /app14 15# Copy your app.py into the container16COPY app.py /app/17 18# Copy your setup script into the container19#COPY model_setup.py /app/20 21# Clone ComfyUI (Git LFS will fetch large files properly)22RUN git clone https://github.com/comfyanonymous/ComfyUI.git ComfyUI23 24# Upgrade pip25RUN pip install --upgrade pip26 27# Install PyTorch CUDA 12.1 and ComfyUI requirements28RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu12129RUN pip install -r ComfyUI/requirements.txt30 31# Upgrade safetensors explicitly32RUN pip install --upgrade safetensors33 34# ---- CUSTOM NODES HERE ----35 36# Create the custom_nodes directory inside ComfyUI37RUN mkdir -p /app/ComfyUI/custom_nodes 38 39# Clone TeaCache40RUN git clone https://github.com/welltop-cn/ComfyUI-TeaCache /app/ComfyUI/custom_nodes/ComfyUI-TeaCache \41 && pip install -r /app/ComfyUI/custom_nodes/ComfyUI-TeaCache/requirements.txt42 43# Clone Comfy Essentials44RUN git clone https://github.com/cubiq/ComfyUI_essentials /app/ComfyUI/custom_nodes/ComfyUI_essentials45 46# Clone Inpaint-CropAndStitch47RUN git clone https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch /app/ComfyUI/custom_nodes/ComfyUI-Inpaint-CropAndStitch48 49# Clone KJNodes50RUN git clone https://github.com/kijai/ComfyUI-KJNodes /app/ComfyUI/custom_nodes/ComfyUI-KJNodes51 52# Clone Impact-Pack53RUN git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack /app/ComfyUI/custom_nodes/ComfyUI-Impact-Pack \54 && pip install -r /app/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/requirements.txt55 56# Clone rgthree57RUN git clone https://github.com/rgthree/rgthree-comfy /app/ComfyUI/custom_nodes/rgthree-comfy58 59# Clone WAS Node Suite60RUN git clone https://github.com/WASasquatch/was-node-suite-comfyui /app/ComfyUI/custom_nodes/was-node-suite-comfyui \61 && pip install -r /app/ComfyUI/custom_nodes/was-node-suite-comfyui/requirements.txt62 63# Clone WAS Node Suite64RUN git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale /app/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale 65 66# ---- END CUSTOM NODES ----67 68RUN pip install diffusers # for tea Cache69 70# Fix permissions explicitly (fixes potential permission issues)71RUN chmod -R 777 /app72RUN mkdir -p /models && chmod -R 777 /models73 74# Expose port explicitly75EXPOSE 786076 77# Start ComfyUI after running your model setup78CMD ["bash", "-c", "python3 app.py"]