mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-16 01:37:04 +08:00
- Add Dockerfile with CUDA 12.6 and Python 3.12 base - Add docker-compose.yml with GPU support and volume mounts - Add docker-entrypoint.sh script with venv management and OTEL support - Add comfy-node-install.sh helper for custom node installation - Update .gitignore to exclude Docker-related artifacts - Entrypoint ensures frontend package matches requirements.txt version - Optional OTEL instrumentation when OTEL_EXPORTER_OTLP_ENDPOINT is set - Volume-mounted repo allows git checkout of release tags without rebuilds
38 lines
1.2 KiB
Docker
38 lines
1.2 KiB
Docker
# Build argument for base image selection
|
|
ARG BASE_IMAGE=nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04
|
|
|
|
# ----------------------
|
|
# Stage: Base Runtime
|
|
# ----------------------
|
|
FROM ${BASE_IMAGE} AS base
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV PIP_PREFER_BINARY=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
python3.12 python3.12-venv python3-pip git git-lfs wget \
|
|
libgl1 libglib2.0-0 libsm6 libxext6 libxrender1 \
|
|
ffmpeg \
|
|
espeak-ng libespeak-ng1 \
|
|
build-essential \
|
|
&& git lfs install \
|
|
&& ln -sf /usr/bin/python3.12 /usr/bin/python \
|
|
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
|
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
|
|
|
# OpenTelemetry packages will be installed in the venv by entrypoint script if needed
|
|
|
|
WORKDIR /app/ComfyUI
|
|
|
|
# Copy entrypoint and helper scripts
|
|
COPY scripts/docker-entrypoint.sh /app/ComfyUI/scripts/docker-entrypoint.sh
|
|
COPY scripts/comfy-node-install.sh /usr/local/bin/comfy-node-install
|
|
RUN chmod +x /app/ComfyUI/scripts/docker-entrypoint.sh && \
|
|
chmod +x /usr/local/bin/comfy-node-install
|
|
|
|
# Set entrypoint
|
|
ENTRYPOINT ["/app/ComfyUI/scripts/docker-entrypoint.sh"]
|
|
|