|
| 1 | +# Copyright (C) 2025 Intel Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +# ======== Base Stage ======== |
| 5 | +FROM intel/llm-scaler-platform:25.38.4.2 |
| 6 | + |
| 7 | +ARG https_proxy |
| 8 | +ARG http_proxy |
| 9 | +ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/python3.10/dist-packages/torch/lib:$LD_LIBRARY_PATH" |
| 10 | + |
| 11 | +COPY ./patches/yunchang_for_multi_arc.patch /tmp/ |
| 12 | +COPY ./patches/xdit_for_multi_arc.patch /tmp/ |
| 13 | +COPY ./patches/raylight_for_multi_arc.patch /tmp/ |
| 14 | + |
| 15 | +# Add Intel oneAPI repo and PPA for GPU support |
| 16 | +RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ |
| 17 | + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \ |
| 18 | +# Install dependencies and Python 3.10 |
| 19 | + apt-get update -y && \ |
| 20 | + apt-get install -y software-properties-common libgl1 && \ |
| 21 | + apt-get install -y libxrender1 libxfixes3 libx11-dev libxi6 libxxf86vm1 libxcursor1 libxrandr2 libxinerama1 libxkbcommon0 libsm6 ffmpeg && \ |
| 22 | + add-apt-repository ppa:deadsnakes/ppa && \ |
| 23 | + apt-get update -y && \ |
| 24 | + apt-get install -y python3.10 python3.10-distutils python3.10-dev && \ |
| 25 | + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && \ |
| 26 | + update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \ |
| 27 | + pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/xpu && \ |
| 28 | + pip install oneccl_bind_pt==2.8.0+xpu --index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ && \ |
| 29 | + pip install bigdl-core-xe-all==2.7.0b20250625 && \ |
| 30 | + apt remove python3-blinker -y && \ |
| 31 | + wget https://download.blender.org/pypi/bpy/bpy-4.0.0-cp310-cp310-manylinux_2_28_x86_64.whl && \ |
| 32 | + pip install bpy-4.0.0-cp310-cp310-manylinux_2_28_x86_64.whl && \ |
| 33 | + rm bpy-4.0.0-cp310-cp310-manylinux_2_28_x86_64.whl && \ |
| 34 | + # Install xDit related dependencies |
| 35 | + mkdir /llm && \ |
| 36 | + cd /llm && \ |
| 37 | + ln -s /usr/bin/python3 /usr/bin/python && \ |
| 38 | + git clone https://github.com/feifeibear/long-context-attention.git && \ |
| 39 | + cd long-context-attention && \ |
| 40 | + git checkout fc5d55e61b78b3102fd824bea1791cf406cc2a4b && \ |
| 41 | + git apply /tmp/yunchang_for_multi_arc.patch && \ |
| 42 | + pip install -e . && \ |
| 43 | + cd /llm && \ |
| 44 | + git clone https://github.com/xdit-project/xDiT.git && \ |
| 45 | + cd xDiT && \ |
| 46 | + git checkout fb8fb0e437a8745b9629020759de31d1626a4a7b && \ |
| 47 | + git apply /tmp/xdit_for_multi_arc.patch && \ |
| 48 | + pip install -e . && \ |
| 49 | +# Install ComfyUI |
| 50 | + cd /llm && \ |
| 51 | + git clone https://github.com/comfyanonymous/ComfyUI.git && \ |
| 52 | + cd ComfyUI && \ |
| 53 | + git checkout 72212fef660bcd7d9702fa52011d089c027a64d8 && \ |
| 54 | + pip install -r requirements.txt && \ |
| 55 | + cd custom_nodes && \ |
| 56 | + git clone https://github.com/ltdrdata/ComfyUI-Manager.git comfyui-manager && \ |
| 57 | + git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git comfyui-videohelpersuite && \ |
| 58 | + cd comfyui-videohelpersuite && \ |
| 59 | + pip install -r requirements.txt && \ |
| 60 | + cd .. && \ |
| 61 | + git clone https://github.com/komikndr/raylight.git && \ |
| 62 | + cd raylight && \ |
| 63 | + git checkout 290c934cdd498b003fbf083e74e91ffc8edb961a && \ |
| 64 | + git apply /tmp/raylight_for_multi_arc.patch && \ |
| 65 | + pip install -r requirements.txt && \ |
| 66 | + cd .. && \ |
| 67 | + git clone https://github.com/yolain/ComfyUI-Easy-Use.git comfyui-easy-use && \ |
| 68 | + cd comfyui-easy-use && \ |
| 69 | + pip install -r requirements.txt && \ |
| 70 | +# Install Xinference |
| 71 | + pip install "xinference[transformers]" && \ |
| 72 | + pip install kokoro Jinja2==3.1.6 jieba ordered-set pypinyin cn2an pypinyin-dict && \ |
| 73 | + # Clean |
| 74 | + rm -rf /tmp/* |
| 75 | + |
| 76 | +COPY ./workflows/* /llm/ComfyUI/user/default/workflows/ |
| 77 | + |
| 78 | +WORKDIR /llm/ComfyUI |
0 commit comments