Files
sammykumar-ComfyUI-SwissArm…/Dockerfile
T
Sam Kumar 570b178f85 ✨ (Dockerfile, docker-compose.yml): add httpx to requirements for enhanced HTTP requests support
✨ (Dockerfile, docker-compose.yml): update CMD to include --base-directory for better temp file management
📝 (TEMP_DIRECTORY_UTILS.md): add documentation for temporary directory utilities to explain usage and benefits
♻️ (temp_utils.py): create utility functions for ComfyUI-aware temporary file and directory management
♻️ (media_selection, media_describe, frame_extractor): refactor to use ComfyUI-aware temp utilities for better file handling
📝 (media-selection README, WORKFLOW_EXAMPLE.md, REDDIT_POST_MEDIA_SOURCE.md): update documentation to reflect changes in temp file management
💡 (media_selection): add comments to clarify the use of ComfyUI-aware temp directory functions
2025-10-08 07:34:58 -05:00

55 lines
1.5 KiB
Docker

FROM python:3.11-slim
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
wget \
ffmpeg \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Create workspace directory
WORKDIR /workspace
# Clone ComfyUI
RUN git clone https://github.com/comfyanonymous/ComfyUI.git
# Set ComfyUI as working directory
WORKDIR /workspace/ComfyUI
# Install PyTorch CPU version first
RUN pip install --no-cache-dir \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install ComfyUI dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Install additional dependencies needed for ComfyUI-SwissArmyKnife
RUN pip install --no-cache-dir \
google-genai \
opencv-python \
requests \
httpx
# Create directories for models and custom nodes if they don't exist
RUN mkdir -p models custom_nodes input output
# Install ComfyUI-Manager
RUN cd custom_nodes && \
git clone https://github.com/ltdrdata/ComfyUI-Manager.git comfyui-manager
# Install ComfyUI-Manager dependencies (includes GitPython and other required packages)
RUN pip install --no-cache-dir -r custom_nodes/comfyui-manager/requirements.txt
# Expose ComfyUI port
EXPOSE 8188
# Default command (can be overridden in docker-compose.yml)
CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "8188", "--cpu", "--base-directory", "/workspace/ComfyUI"]