# Base image for ComfyUI workers: ComfyUI at a pinned commit, the worker SDK and the ComfyUI helper.
# Builds on the local CUDA + torch image (localhost/comfyui:cuda13.0) that v1 also uses.
FROM localhost/comfyui:cuda13.0
ARG COMFYUI_COMMIT=b33e2b55cae074eca5aec96283cceac19aa249ba
USER root
WORKDIR /opt
RUN rm -rf /opt/ComfyUI \
 && git clone https://github.com/Comfy-Org/ComfyUI.git /opt/ComfyUI \
 && cd /opt/ComfyUI \
 && git checkout "${COMFYUI_COMMIT}" \
 && rm -rf .git \
 && python -m pip install -r requirements.txt
COPY sdk/labworker /worker/labworker
COPY comfy/labcomfy /worker/labcomfy
ENV PYTHONPATH=/worker PYTHONUNBUFFERED=1
WORKDIR /worker
ENTRYPOINT []
