Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| wget \ | |
| curl \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Clone ComfyUI into /app | |
| RUN git clone https://github.com/comfyanonymous/ComfyUI.git . | |
| # Install ComfyUI requirements | |
| RUN pip install --no-cache-dir torch torchvision --extra-index-url https://download.pytorch.org/whl/cu121 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Clone ComfyUI-TRELLIS2 and install its requirements | |
| RUN git clone https://github.com/PozzettiAndrea/ComfyUI-TRELLIS2.git /app/custom_nodes/ComfyUI-TRELLIS2 | |
| RUN pip install --no-cache-dir -r /app/custom_nodes/ComfyUI-TRELLIS2/requirements.txt | |
| # Install extra requirements for custom nodes | |
| RUN pip install --no-cache-dir \ | |
| gradio \ | |
| spaces \ | |
| diffusers \ | |
| transformers \ | |
| accelerate \ | |
| safetensors \ | |
| pillow \ | |
| opencv-python-headless \ | |
| scipy | |
| # Copy custom launcher script | |
| COPY app.py /app/app.py | |
| # Copy custom nodes and workflows | |
| COPY custom_nodes/ /app/custom_nodes/ | |
| COPY workflows/ /app/workflows/ | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run the launcher app | |
| CMD ["python", "app.py"] | |