oKen38461 commited on
Commit
67c8832
·
1 Parent(s): 725a76b

README.mdのSDKバージョンを5.34.2に更新し、requirements.txtにおいてgradioのバージョンを5.34.2に固定しました。また、依存関係のコメントを整理しました。

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. requirements.txt +6 -3
  3. エラーログ.md +200 -0
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🎬
4
  colorFrom: purple
5
  colorTo: pink
6
  sdk: gradio
7
- sdk_version: 4.0.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: purple
5
  colorTo: pink
6
  sdk: gradio
7
+ sdk_version: 5.34.2
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
requirements.txt CHANGED
@@ -1,7 +1,9 @@
1
- # Wan2.1 VACE dependencies
2
  torch==2.5.1
3
  torchvision==0.20.1
4
- gradio>=3.46,<4
 
 
5
  fastapi>=0.111
6
  uvicorn>=0.30
7
  huggingface-hub>=0.22
@@ -18,5 +20,6 @@ imageio>=2.31.0
18
  imageio-ffmpeg>=0.4.8
19
 
20
  # Wan2.1 and VACE implementations from GitHub
 
21
  git+https://github.com/Wan-Video/Wan2.1.git#egg=wan
22
- git+https://github.com/ali-vilab/VACE.git#egg=VACE
 
1
+ # Core dependencies - Install torch first
2
  torch==2.5.1
3
  torchvision==0.20.1
4
+
5
+ # Wan2.1 VACE dependencies
6
+ gradio==5.34.2
7
  fastapi>=0.111
8
  uvicorn>=0.30
9
  huggingface-hub>=0.22
 
20
  imageio-ffmpeg>=0.4.8
21
 
22
  # Wan2.1 and VACE implementations from GitHub
23
+ # Note: These require torch to be installed first
24
  git+https://github.com/Wan-Video/Wan2.1.git#egg=wan
25
+ git+https://github.com/ali-vilab/VACE.git#egg=VACE
エラーログ.md ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ build error
2
+ Job failed with exit code: 1
3
+ Build logs:
4
+
5
+ ===== Build Queued at 2025-06-21 05:12:08 / Commit SHA: 725a76b =====
6
+
7
+ --> FROM docker.io/nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04@sha256:fb1ad20f2552f5b3aafb2c9c478ed57da95e2bb027d15218d7a55b3a0e4b4413
8
+ DONE 0.0s
9
+
10
+ --> RUN pyenv install 3.10 && pyenv global 3.10 && pyenv rehash
11
+ CACHED
12
+
13
+ --> RUN apt-get update && apt-get install -y git rsync make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
14
+ CACHED
15
+
16
+ --> RUN curl https://pyenv.run | bash
17
+ CACHED
18
+
19
+ --> COPY --chown=1000:1000 --from=root / /
20
+ CACHED
21
+
22
+ --> RUN apt-get update && apt-get install -y fakeroot && mv /usr/bin/apt-get /usr/bin/.apt-get && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get && chmod +x /usr/bin/apt-get && rm -rf /var/lib/apt/lists/* && useradd -m -u 1000 user
23
+ CACHED
24
+
25
+ --> WORKDIR /home/user/app
26
+ CACHED
27
+
28
+ --> RUN pip install --no-cache-dir pip -U && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf_xet>=1.0.0,<2.0.0" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
29
+ CACHED
30
+
31
+ --> Restoring cache
32
+ DONE 32.0s
33
+
34
+ --> RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
35
+ Collecting wan (from -r /tmp/requirements.txt (line 21))
36
+ Cloning https://github.com/Wan-Video/Wan2.1.git to /tmp/pip-install-mzrtr4nt/wan_79792b569ac3421fb975d517f637b636
37
+ Running command git clone --filter=blob:none --quiet https://github.com/Wan-Video/Wan2.1.git /tmp/pip-install-mzrtr4nt/wan_79792b569ac3421fb975d517f637b636
38
+ Resolved https://github.com/Wan-Video/Wan2.1.git to commit 8f7f6514f11d852811cee72a17b574633bcdac44
39
+ Installing build dependencies: started
40
+ Installing build dependencies: finished with status 'done'
41
+ Getting requirements to build wheel: started
42
+ Getting requirements to build wheel: finished with status 'done'
43
+ Preparing metadata (pyproject.toml): started
44
+ Preparing metadata (pyproject.toml): finished with status 'done'
45
+ Collecting VACE (from -r /tmp/requirements.txt (line 22))
46
+ Cloning https://github.com/ali-vilab/VACE.git to /tmp/pip-install-mzrtr4nt/vace_4b819f0b5f554e25bfd7c6ab3624ac74
47
+ Running command git clone --filter=blob:none --quiet https://github.com/ali-vilab/VACE.git /tmp/pip-install-mzrtr4nt/vace_4b819f0b5f554e25bfd7c6ab3624ac74
48
+ Resolved https://github.com/ali-vilab/VACE.git to commit 0897c6d055d7d9ea9e191dce763006664d9780f8
49
+ Installing build dependencies: started
50
+ Installing build dependencies: finished with status 'done'
51
+ Getting requirements to build wheel: started
52
+ Getting requirements to build wheel: finished with status 'done'
53
+ Preparing metadata (pyproject.toml): started
54
+ Preparing metadata (pyproject.toml): finished with status 'done'
55
+ Collecting torch==2.5.1 (from -r /tmp/requirements.txt (line 2))
56
+ Downloading torch-2.5.1-cp310-cp310-manylinux1_x86_64.whl.metadata (28 kB)
57
+ Collecting torchvision==0.20.1 (from -r /tmp/requirements.txt (line 3))
58
+ Downloading torchvision-0.20.1-cp310-cp310-manylinux1_x86_64.whl.metadata (6.1 kB)
59
+ Collecting gradio<4,>=3.46 (from -r /tmp/requirements.txt (line 4))
60
+ Downloading gradio-3.50.2-py3-none-any.whl.metadata (17 kB)
61
+ Collecting fastapi>=0.111 (from -r /tmp/requirements.txt (line 5))
62
+ Downloading fastapi-0.115.13-py3-none-any.whl.metadata (27 kB)
63
+ Collecting uvicorn>=0.30 (from -r /tmp/requirements.txt (line 6))
64
+ Downloading uvicorn-0.34.3-py3-none-any.whl.metadata (6.5 kB)
65
+ Requirement already satisfied: huggingface-hub>=0.22 in /home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages (from -r /tmp/requirements.txt (line 7)) (0.33.0)
66
+ Requirement already satisfied: numpy>=1.24.0 in /home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages (from -r /tmp/requirements.txt (line 8)) (2.2.6)
67
+ Collecting opencv-python>=4.8.0 (from -r /tmp/requirements.txt (line 9))
68
+ Downloading opencv_python-4.11.0.86-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
69
+ Collecting Pillow>=10.0.0 (from -r /tmp/requirements.txt (line 10))
70
+ Downloading pillow-11.2.1-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (8.9 kB)
71
+ Requirement already satisfied: tqdm>=4.65.0 in /home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages (from -r /tmp/requirements.txt (line 11)) (4.67.1)
72
+ Collecting transformers>=4.30.0 (from -r /tmp/requirements.txt (line 12))
73
+ Downloading transformers-4.52.4-py3-none-any.whl.metadata (38 kB)
74
+ Collecting accelerate>=0.20.0 (from -r /tmp/requirements.txt (line 13))
75
+ Downloading accelerate-1.8.1-py3-none-any.whl.metadata (19 kB)
76
+ Collecting safetensors>=0.3.1 (from -r /tmp/requirements.txt (line 14))
77
+ Downloading safetensors-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.8 kB)
78
+ Collecting einops>=0.7.0 (from -r /tmp/requirements.txt (line 15))
79
+ Downloading einops-0.8.1-py3-none-any.whl.metadata (13 kB)
80
+ Collecting omegaconf>=2.3.0 (from -r /tmp/requirements.txt (line 16))
81
+ Downloading omegaconf-2.3.0-py3-none-any.whl.metadata (3.9 kB)
82
+ Collecting imageio>=2.31.0 (from -r /tmp/requirements.txt (line 17))
83
+ Downloading imageio-2.37.0-py3-none-any.whl.metadata (5.2 kB)
84
+ Collecting imageio-ffmpeg>=0.4.8 (from -r /tmp/requirements.txt (line 18))
85
+ Downloading imageio_ffmpeg-0.6.0-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)
86
+ Collecting diffusers>=0.31.0 (from wan->-r /tmp/requirements.txt (line 21))
87
+ Downloading diffusers-0.33.1-py3-none-any.whl.metadata (19 kB)
88
+ Collecting tokenizers>=0.20.3 (from wan->-r /tmp/requirements.txt (line 21))
89
+ Downloading tokenizers-0.21.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)
90
+ Collecting easydict (from wan->-r /tmp/requirements.txt (line 21))
91
+ Downloading easydict-1.13-py3-none-any.whl.metadata (4.2 kB)
92
+ Collecting ftfy (from wan->-r /tmp/requirements.txt (line 21))
93
+ Downloading ftfy-6.3.1-py3-none-any.whl.metadata (7.3 kB)
94
+ Collecting dashscope (from wan->-r /tmp/requirements.txt (line 21))
95
+ Downloading dashscope-1.23.5-py3-none-any.whl.metadata (6.8 kB)
96
+ Collecting flash_attn (from wan->-r /tmp/requirements.txt (line 21))
97
+ Downloading flash_attn-2.8.0.post2.tar.gz (7.9 MB)
98
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 272.7 MB/s eta 0:00:00
99
+ Installing build dependencies: started
100
+ Installing build dependencies: finished with status 'done'
101
+ Getting requirements to build wheel: started
102
+ Getting requirements to build wheel: finished with status 'error'
103
+ error: subprocess-exited-with-error
104
+
105
+ × Getting requirements to build wheel did not run successfully.
106
+ │ exit code: 1
107
+ ╰─> [17 lines of output]
108
+ Traceback (most recent call last):
109
+ File "/home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
110
+ main()
111
+ File "/home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
112
+ json_out["return_val"] = hook(**hook_input["kwargs"])
113
+ File "/home/user/.pyenv/versions/3.10.18/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
114
+ return hook(config_settings)
115
+ File "/tmp/pip-build-env-e65_ay7c/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
116
+ return self._get_build_requires(config_settings, requirements=[])
117
+ File "/tmp/pip-build-env-e65_ay7c/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
118
+ self.run_setup()
119
+ File "/tmp/pip-build-env-e65_ay7c/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 512, in run_setup
120
+ super().run_setup(setup_script=setup_script)
121
+ File "/tmp/pip-build-env-e65_ay7c/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup
122
+ exec(code, locals())
123
+ File "<string>", line 22, in <module>
124
+ ModuleNotFoundError: No module named 'torch'
125
+ [end of output]
126
+
127
+ note: This error originates from a subprocess, and is likely not a problem with pip.
128
+ error: subprocess-exited-with-error
129
+
130
+ × Getting requirements to build wheel did not run successfully.
131
+ │ exit code: 1
132
+ ╰─> See above for output.
133
+
134
+ note: This error originates from a subprocess, and is likely not a problem with pip.
135
+
136
+ --> ERROR: process "/bin/sh -c pip install --no-cache-dir -r /tmp/requirements.txt" did not complete successfully: exit code: 1
137
+
138
+
139
+ =========
140
+ 追加で、Your Space is using an old version of Gradio (4.0.0) that is subject to security vulnerabilities. Please update to the latest version.のエラーが出ています。
141
+
142
+
143
+ ⚠️警告(「Gradio 4.0.0 は脆弱」)の原因
144
+ • Space が標準イメージに同梱した Gradio 4.0.0 を優先
145
+ (pip install gradio==4.0.0 が自動実行されている)
146
+ • 我々の requirements.* に 「== バージョン固定」 が無く、インストール順が逆転した結果、古い 4.0.0 が残った。
147
+
148
+
149
+
150
+ ✅ 修正内容(5 分で完了)
151
+
152
+ ファイル 変更点 コマンド例
153
+ requirements.lock.txt gradio==5.34.2 を明示(2025-06-19 リリース最新) text\ngradio==5.34.2\n
154
+ Dockerfile(使っている場合) pip install gradio==5.34.2 を PyTorchの後 に追加 dockerfile\nRUN pip install --no-cache-dir gradio==5.34.2\n
155
+ hf.yaml(ある場合のみ) 変更不要
156
+
157
+ ポイント
158
+ • Gradio 5 は 4.x と互換 API(Blocks, Row, Tab, mount_gradio_app など)を保持。既存コードはそのまま動きます。
159
+ • Spaces は Node 20 がプリインストールされているため、Gradio 5 の SSR モードも自動で有効になり���す(設定不要)。
160
+
161
+
162
+
163
+ 🔄 手順
164
+ 1. requirements.lock.txt を編集
165
+
166
+ sed -i 's/^gradio.*/gradio==5.34.2/' requirements.lock.txt
167
+
168
+
169
+ 2. (Dockerfile 利用時) 依存インストール行を追加/更新
170
+
171
+ RUN pip install --no-cache-dir gradio==5.34.2
172
+
173
+
174
+ 3. git add & push
175
+
176
+ git add requirements.lock.txt Dockerfile
177
+ git commit -m "fix: pin gradio 5.34.2 for security"
178
+ git push
179
+
180
+
181
+ 4. Space が Rebuild → 成功
182
+ • ビルドログ冒頭に Collecting gradio==5.34.2 が出れば OK
183
+ • 起動後、警告は消えます。
184
+
185
+
186
+
187
+ 📝 検証スクリプト(起動時に一度だけ実行)
188
+
189
+ import gradio as gr, sys
190
+ assert gr.__version__ == "5.34.2", f"wrong gradio {gr.__version__}"
191
+ print("✅ Gradio 5.34.2 loaded OK")
192
+ sys.exit()
193
+
194
+
195
+
196
+
197
+ 参考: 最新版確認ソース
198
+ • Gradio 5.34.2 は 2025-06-19 の PyPI 最新安定版 
199
+
200
+ これで 脆弱性警告は完全に解消 します。