|
| 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 ./ ./ |
| 39 | + |
| 40 | +RUN pip install --no-cache -r requirements.txt \ |
| 41 | + # post requirements installation require gpu, setup |
| 42 | + # `nvidia-container-runtime`, for docker, see |
| 43 | + # https://stackoverflow.com/a/61737404 |
| 44 | + -r requirements_post.txt \ |
| 45 | + # those seem to be missed |
| 46 | + ninja scikit-learn rembg[gpu] open_clip_torch |
| 47 | + |
| 48 | +WORKDIR /app |
| 49 | +ENTRYPOINT [ "python", "main.py", "--listen", "0.0.0.0" ] |
0 commit comments