Spaces:
Paused
Paused
Commit ·
61027c5
1
Parent(s): 3d1b476
Fix: install Wan2.2 deps directly (skip flash_attn/dashscope which fail in Docker build)
Browse files1 unmodified line234567811 unmodified lines202122232425262728293031323334353637383940411 unmodified lineFROM nvidia/cuda:12.4.0-runtime-ubuntu22.04# System depsRUN apt-get update && apt-get install -y \python3.10 python3.10-dev python3-pip \ffmpeg libsm6 libxext6 libgl1 \11 unmodified linesWORKDIR /app# Clone official Wan2.2 inference codeRUN git clone https://github.com/Wan-Video/Wan2.2.git /app/Wan2.2# Install PyTorch with CUDA 12.4RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124# Install Wan2.2 depsRUN cd /app/Wan2.2 && pip install --no-cache-dir -r requirements.txt# Install FastAPI depsCOPY --chown=user ./requirements.txt requirements.txtRUN pip install --no-cache-dir -r requirements.txt# Copy app codeCOPY --chown=user ./app.py app.pyCOPY --chown=user ./README.md README.md# Model is downloaded at startup by app.py, cached to /dataCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]1 unmodified line23456711 unmodified lines19202122232425262728293031323334353637383940414243444546474849501 unmodified lineFROM nvidia/cuda:12.4.0-runtime-ubuntu22.04RUN apt-get update && apt-get install -y \python3.10 python3.10-dev python3-pip \ffmpeg libsm6 libxext6 libgl1 \11 unmodified linesWORKDIR /app# Clone official Wan2.2 repoRUN git clone https://github.com/Wan-Video/Wan2.2.git /app/Wan2.2# PyTorchRUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124# Wan2.2 core deps (skip flash_attn and dashscope which won't build here)RUN pip install --no-cache-dir \opencv-python>=4.9.0.80 \diffusers>=0.31.0 \"transformers>=4.49.0,<=4.51.3" \tokenizers>=0.20.3 \accelerate>=1.1.1 \tqdm \"imageio[ffmpeg]" \easydict \ftfy \imageio-ffmpeg \"numpy>=1.23.5,<2"# FastAPICOPY --chown=user ./requirements.txt requirements.txtRUN pip install --no-cache-dir -r requirements.txt# Copy appCOPY --chown=user ./app.py app.pyCOPY --chown=user ./README.md README.mdCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+18-9