Add Dockerfile for ComfyUI CPU-only build

This commit is contained in:
Dennis van Remortel
2026-06-22 12:37:27 +02:00
parent f66b7900c5
commit 7bfbf68d6b
+18
View File
@@ -0,0 +1,18 @@
FROM docker.io/library/python:3.13-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git libgl1 libglib2.0-0 libsm6 libxext6 libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN git clone --depth 1 https://github.com/comfyanonymous/ComfyUI . \
&& pip install --no-cache-dir torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir -r requirements.txt
RUN useradd -u 1000 -m comfyui && chown -R 1000:1000 /app
USER 1000
EXPOSE 8188
CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "8188", "--cpu"]