|
| 1 | +ARG CUDA_VERSION=12.1.0-devel |
| 2 | + |
| 3 | +FROM docker.io/nvidia/cuda:${CUDA_VERSION}-ubuntu22.04 |
| 4 | + |
| 5 | +RUN apt-get update && \ |
| 6 | + apt-get install --no-install-recommends -y \ |
| 7 | + build-essential \ |
| 8 | + curl \ |
| 9 | + ffmpeg \ |
| 10 | + git \ |
| 11 | + libgl1 libglib2.0-0 \ |
| 12 | + libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \ |
| 13 | + libegl1-mesa-dev \ |
| 14 | + ninja-build \ |
| 15 | + python3.11 \ |
| 16 | + python3.11-dev \ |
| 17 | + wget \ |
| 18 | + && \ |
| 19 | + curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 && \ |
| 20 | + rm -rf /var/lib/apt/lists/* |
| 21 | + |
| 22 | +RUN ln -s /usr/bin/python3.11 /usr/bin/python & \ |
| 23 | + ln -s /usr/bin/pip3.11 /usr/bin/pip |
| 24 | + |
| 25 | +RUN adduser --uid 1001 -q user && \ |
| 26 | + mkdir /app && chown user /app |
| 27 | +USER user |
| 28 | + |
| 29 | +RUN pip install --no-cache --index-url https://download.pytorch.org/whl/cu121 \ |
| 30 | + torch==2.2.0 torchvision==0.17.0 xformers==0.0.24 |
| 31 | + |
| 32 | +WORKDIR /app |
| 33 | +RUN git clone "https://github.com/comfyanonymous/ComfyUI.git" ./ && \ |
| 34 | + git reset --hard 05cd00695a84cebd5603a31f665eb7301fba2beb |
| 35 | +RUN pip install --no-cache -r requirements.txt |
| 36 | + |
| 37 | +WORKDIR /app/custom_nodes/ComfyUI-3D-Pack/ |
| 38 | +COPY --chown=user:user requirements.txt requirements_post.txt ./ |
| 39 | +COPY --chown=user:user simple-knn/ simple-knn/ |
| 40 | +COPY --chown=user:user tgs/ tgs/ |
| 41 | +RUN pip install --no-cache -r requirements.txt \ |
| 42 | + # post requirements installation require gpu, setup |
| 43 | + # `nvidia-container-runtime`, for docker, see |
| 44 | + # https://stackoverflow.com/a/61737404 |
| 45 | + -r requirements_post.txt \ |
| 46 | + # those seem to be missed |
| 47 | + ninja scikit-learn rembg[gpu] open_clip_torch |
| 48 | + |
| 49 | +WORKDIR /app/custom_nodes/ |
| 50 | +RUN git clone "https://github.com/ltdrdata/ComfyUI-Impact-Pack" && \ |
| 51 | + cd ComfyUI-Impact-Pack && \ |
| 52 | + git reset --hard e1570e76799049fb0038f6232fd89800ab4565eb && \ |
| 53 | + pip install --no-cache -r requirements.txt |
| 54 | +RUN git clone "https://github.com/kijai/ComfyUI-KJNodes" && \ |
| 55 | + cd ComfyUI-KJNodes && \ |
| 56 | + git reset --hard 95ae8b067a8aa5825471189954579ffa02aa9256 && \ |
| 57 | + pip install --no-cache -r requirements.txt |
| 58 | +RUN git clone "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite" && \ |
| 59 | + cd ComfyUI-VideoHelperSuite && \ |
| 60 | + git reset --hard f94597739f20dac331f9918a245149b6b00a60f2 && \ |
| 61 | + pip install --no-cache -r requirements.txt |
| 62 | + |
| 63 | +COPY --chown=user:user ./ ComfyUI-3D-Pack/ |
| 64 | + |
| 65 | +WORKDIR /app |
| 66 | +ENTRYPOINT [ "python", "main.py", "--listen", "0.0.0.0" ] |
0 commit comments