sayeed105236 commited on
Commit
61027c5
·
1 Parent(s): 3d1b476

Fix: install Wan2.2 deps directly (skip flash_attn/dashscope which fail in Docker build)

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -9
Dockerfile CHANGED
@@ -2,7 +2,6 @@
2
 
3
  FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04
4
 
5
- # System deps
6
  RUN apt-get update && apt-get install -y \
7
  python3.10 python3.10-dev python3-pip \
8
  ffmpeg libsm6 libxext6 libgl1 \
@@ -20,22 +19,32 @@ ENV PYTHONUNBUFFERED=1
20
 
21
  WORKDIR /app
22
 
23
- # Clone official Wan2.2 inference code
24
  RUN git clone https://github.com/Wan-Video/Wan2.2.git /app/Wan2.2
25
 
26
- # Install PyTorch with CUDA 12.4
27
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
28
 
29
- # Install Wan2.2 deps
30
- RUN cd /app/Wan2.2 && pip install --no-cache-dir -r requirements.txt
31
-
32
- # Install FastAPI deps
 
 
 
 
 
 
 
 
 
 
 
33
  COPY --chown=user ./requirements.txt requirements.txt
34
  RUN pip install --no-cache-dir -r requirements.txt
35
 
36
- # Copy app code
37
  COPY --chown=user ./app.py app.py
38
  COPY --chown=user ./README.md README.md
39
 
40
- # Model is downloaded at startup by app.py, cached to /data
41
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  python3.10 python3.10-dev python3-pip \
7
  ffmpeg libsm6 libxext6 libgl1 \
 
19
 
20
  WORKDIR /app
21
 
22
+ # Clone official Wan2.2 repo
23
  RUN git clone https://github.com/Wan-Video/Wan2.2.git /app/Wan2.2
24
 
25
+ # PyTorch
26
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
27
 
28
+ # Wan2.2 core deps (skip flash_attn and dashscope which won't build here)
29
+ RUN pip install --no-cache-dir \
30
+ opencv-python>=4.9.0.80 \
31
+ diffusers>=0.31.0 \
32
+ "transformers>=4.49.0,<=4.51.3" \
33
+ tokenizers>=0.20.3 \
34
+ accelerate>=1.1.1 \
35
+ tqdm \
36
+ "imageio[ffmpeg]" \
37
+ easydict \
38
+ ftfy \
39
+ imageio-ffmpeg \
40
+ "numpy>=1.23.5,<2"
41
+
42
+ # FastAPI
43
  COPY --chown=user ./requirements.txt requirements.txt
44
  RUN pip install --no-cache-dir -r requirements.txt
45
 
46
+ # Copy app
47
  COPY --chown=user ./app.py app.py
48
  COPY --chown=user ./README.md README.md
49
 
 
50
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]