Advertisement
cryptoscum

Untitled

May 27th, 2025
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.52 KB | None | 0 0
  1. # Use NVIDIA CUDA 12.8.1 image based on Ubuntu 22.04
  2. FROM nvidia/cuda:12.8.1-devel-ubuntu22.04
  3.  
  4. # Set environment variables for a cleaner setup
  5. ENV DEBIAN_FRONTEND=noninteractive
  6. ENV PYTHONUNBUFFERED=1
  7. ENV TORCH_CUDA_ARCH_LIST="6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0,12.0"
  8. # CUDA Architecture Guide:
  9. # ----------------------
  10. # 6.0, 6.1: Pascal (GTX 1080, 1070, 1060)
  11. # 7.0: Volta (V100)
  12. # 7.2: Turing (T4)
  13. # 7.5: Turing (RTX 2080 Ti, 2080, 2070, 2060)
  14. # 8.0: Ampere (A100)
  15. # 8.6: Ampere Consumer (RTX 3090, 3080, 3070, 3060)
  16. # 8.9: Ada Loverlace (RTX 4090, 4080, 4070)
  17. # 9.0: Hopper (H200, H100, GH200
  18. # 12.0: Blacwell (GeForce RTX 5090, RTX 5080, RTX 5070 Ti, RTX 5070, RTX 5060 Ti, RTX 5060, \
  19. #   RTX PRO 6000 Blackwell, RTX PRO 5000 Blackwell, RTX PRO 4500 Blackwell, RTX PRO 4000 Blackwell
  20.  
  21.  
  22. # Install python 3.12 and base tools
  23. RUN apt-get update && apt-get install -y \
  24.     software-properties-common && \
  25.     add-apt-repository ppa:deadsnakes/ppa && \
  26.     apt-get update && apt-get install -y \
  27.     python3.12 \
  28.     python3.12-dev \
  29.     python3.12-venv \
  30.     tmux \
  31.     git \
  32.     wget \
  33.     curl \
  34.     gnupg2 \
  35.     build-essential \
  36.     ninja-build \
  37.     libgl1-mesa-glx \
  38.     libglib2.0-0 \
  39.     && rm -rf /var/lib/apt/lists/*
  40.  
  41. # Set Python 3.12 as default
  42. RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
  43.     update-alternatives --set python3 /usr/bin/python3.12
  44.  
  45. # Install pip for Python 3.12
  46. RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12
  47.  
  48. # Install PyTorch with CUDA 12.8 support
  49. RUN python3 -m pip install --pre --no-cache-dir torch torchvision torchaudio \
  50.     --index-url https://download.pytorch.org/whl/nightly/cu128
  51.  
  52. # Clone the repositories and install requirements
  53. WORKDIR /app
  54. RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \
  55.     python3 -m pip install --no-cache-dir -r requirements.txt && \
  56.     python3 -m pip install --no-cache-dir deepdiff
  57.  
  58. # Custom nodes setup
  59. WORKDIR /app/custom_nodes
  60. RUN git clone https://github.com/crystian/ComfyUI-Crystools.git && \
  61.     cd ComfyUI-Crystools && \
  62.     python3 -m pip install --no-cache-dir -r requirements.txt && \
  63.     cd .. && \
  64.     git clone https://github.com/nonnonstop/comfyui-faster-loading.git && \
  65.     git clone https://github.com/ltdrdata/ComfyUI-Manager.git
  66.  
  67. # Expose the necessary port for the application
  68. EXPOSE 8188/tcp
  69.  
  70. # Final launch command
  71. WORKDIR /app
  72. ENTRYPOINT ["python3", "main.py", "--listen", "--cuda-device", "0", "--disable-cuda-malloc", "--port", "8188"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement