FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 # Build arg for GPU architectures ARG CUDA_ARCHITECTURES="8.0;8.6" ENV DEBIAN_FRONTEND=noninteractive # Install system dependencies RUN apt update && \ apt install -y \ python3 python3-pip git wget curl cmake ninja-build \ libgl1 libglib2.0-0 ffmpeg && \ apt clean WORKDIR /workspace COPY requirements.txt . # Upgrade pip first RUN pip install --upgrade pip setuptools wheel # Install requirements if exists RUN pip install -r requirements.txt # Install PyTorch with CUDA support RUN pip install --extra-index-url https://download.pytorch.org/whl/cu124 \ torch==2.6.0+cu124 torchvision==0.21.0+cu124 # Install SageAttention from git (patch GPU detection) ENV TORCH_CUDA_ARCH_LIST="${CUDA_ARCHITECTURES}" ENV FORCE_CUDA="1" ENV MAX_JOBS="1" COPY <