# Use an official PyTorch image with CUDA support FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 ARG TKN="hf_" # Set environment variables ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONUNBUFFERED=1 ENV TZ=Etc/UTC ENV HF_TKN=$TKN # Install system dependencies RUN apt-get update && apt-get install -y \ git \ wget \ curl \ build-essential \ libgl1 \ libglib2.0-0 \ python3.10 \ python3.10-dev \ python3.10-venv \ python3-pip \ libxrender1 \ libxkbcommon-x11-0 \ libxi6 \ libsm6 \ libxext6 \ libglfw3-dev \ libgles2-mesa-dev\ && rm -rf /var/lib/apt/lists/* # Setup custom nodes WORKDIR /workspace/custom_nodes/ RUN rm -rf ComfyUI_Comfyroll_CustomNodes RUN git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git WORKDIR /workspace/custom_nodes/ComfyUI_Comfyroll_CustomNodes # Replace the node_mappings.py file RUN rm node_mappings.py COPY patch/node_mappings.py /workspace/custom_nodes/ComfyUI_Comfyroll_CustomNodes/ # Install requirements WORKDIR /workspace COPY requirements.txt /workspace RUN pip install -r requirements.txt