Files
AI-Profile-Router/platform/docker/qwen-image-worker/Dockerfile
T

22 lines
886 B
Docker

ARG PYTORCH_IMAGE=pytorch/pytorch:2.11.0-cuda12.8-cudnn9-runtime
FROM ${PYTORCH_IMAGE}
ARG COMFYUI_COMMIT
RUN test -n "$COMFYUI_COMMIT" \
&& apt-get update \
&& apt-get install -y --no-install-recommends git ca-certificates \
&& git clone --filter=blob:none https://github.com/Comfy-Org/ComfyUI.git /opt/ComfyUI \
&& git -C /opt/ComfyUI checkout "$COMFYUI_COMMIT" \
&& python -m pip install --break-system-packages --no-cache-dir \
-r /opt/ComfyUI/requirements.txt \
&& apt-get purge -y --auto-remove git \
&& groupadd --gid 10002 qwen-image \
&& useradd --uid 10002 --gid 10002 --no-create-home \
--home-dir /nonexistent --shell /usr/sbin/nologin qwen-image \
&& rm -rf /var/lib/apt/lists/* /root/.cache
WORKDIR /opt/ComfyUI
COPY qwen_image_worker.py /opt/qwen-image-worker.py
EXPOSE 8086
CMD ["python", "/opt/qwen-image-worker.py"]