Spaces:
Paused
Paused
| # ============================================================================= | |
| # DOCKERFILE - ADUC-SDR: AI Video Suite v4.1.0 | |
| # Base: CUDA 12.8.0 | PyTorch 2.8.0+cu121 | |
| # Otimizado para Hugging Face Spaces com 8x NVIDIA L40S GPUs | |
| # ============================================================================= | |
| # Base CUDA 12.8.0 | |
| FROM nvidia/cuda:12.8.0-devel-ubuntu22.04 | |
| # ============================================================================= | |
| # METADADOS | |
| # ============================================================================= | |
| LABEL maintainer="Carlos Rodrigues dos Santos & Development Partner" | |
| LABEL description="ADUC-SDR: Production-Ready Multi-GPU AI Video Generation Suite with Wan2.2, SeedVR, LTX, MMAudio" | |
| LABEL version="4.1.0" | |
| LABEL cuda_version="12.8.0+cu128" | |
| LABEL python_version="3.10" | |
| # A wheel do PyTorch é compilada contra o CUDA Toolkit 12.1, mas é 100% compatível | |
| # com o driver mais recente (12.8) presente na imagem base. | |
| LABEL pytorch_version="2.8.0+cu121" | |
| LABEL gpu_optimized_for="8x_NVIDIA_L40S" | |
| # ============================================================================= | |
| # VARIÁVEIS DE AMBIENTE GLOBAIS | |
| # ============================================================================= | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV TZ=UTC | |
| ENV LANG=C.UTF-8 | |
| ENV LC_ALL=C.UTF-8 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PIP_NO_CACHE_DIR=1 | |
| ENV PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| # Otimizações de CUDA e Build | |
| ENV NVIDIA_VISIBLE_DEVICES=all | |
| ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| ENV TORCH_CUDA_ARCH_LIST="8.9" | |
| ENV MAX_JOBS=90 | |
| # Caminhos da Aplicação | |
| ENV APP_HOME=/app | |
| WORKDIR $APP_HOME | |
| # ============================================================================= | |
| # PACOTES DO SISTEMA E PYTHON 3.10 | |
| # ============================================================================= | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| build-essential cmake git git-lfs curl wget ffmpeg ninja-build \ | |
| python3.10 python3.10-dev python3.10-distutils python3-pip \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 && \ | |
| ln -sf /usr/bin/python3.10 /usr/bin/python && \ | |
| python3 -m pip install --upgrade pip | |
| # ============================================================================= | |
| # INSTALAÇÃO DE BIBLIOTECAS DE ALTA PERFORMANCE | |
| # ============================================================================= | |
| # 1. Instala PyTorch 2.8.0 e ferramentas de build | |
| RUN pip -v install \ | |
| torch>=2.8.0+cu128 \ | |
| torchvision \ | |
| torchaudio \ | |
| --index-url https://download.pytorch.org/whl/cu128 | |
| RUN pip install \ | |
| packaging \ | |
| ninja \ | |
| cmake \ | |
| pybind11 \ | |
| scikit-build \ | |
| cython \ | |
| numpy | |
| # ============================================================================= | |
| # INSTALAÇÃO DO RESTANTE DAS DEPENDÊNCIAS | |
| # ============================================================================= | |
| COPY requirements.txt . | |
| # Instala os pacotes restantes do requirements.txt | |
| # A linha do flash-attention no arquivo será ignorada se já estiver instalado, mas é bom limpá-la. | |
| RUN pip install -r requirements.txt | |
| # ============================================================================= | |
| # CLONAGEM E INSTALAÇÃO DOS REPOSITÓRIOS DA APLICAÇÃO | |
| # ============================================================================= | |
| RUN git clone https://github.com/Wan-Video/Wan2.2.git && cd Wan2.2 && pip install -r requirements.txt && pip install -r requirements_s2v.txt | |
| RUN git clone https://github.com/bytedance-seed/SeedVR.git && cd SeedVR && pip install -r requirements.txt | |
| RUN git clone https://github.com/hkchengrex/MMAudio.git && cd MMAudio && pip install -e . | |
| RUN git clone https://github.com/Lightricks/LTX-Video.git && cd LTX-Video && pip install -e .[inference] | |
| # ============================================================================= | |
| # COPIA O CÓDIGO DA APLICAÇÃO E CONFIGURA PERMISSÕES | |
| # ============================================================================= | |
| COPY . . | |
| RUN useradd -m -u 1000 -s /bash appuser && \ | |
| chown -R appuser:appuser $APP_HOME && \ | |
| mkdir -p /app && chown -R appuser:appuser /app | |
| USER appuser | |
| # ============================================================================= | |
| # PONTO DE ENTRADA | |
| # ============================================================================= | |
| RUN chmod +x ./start.sh | |
| ENTRYPOINT ["./start.sh"] | |
| CMD ["gradio"] |