Spaces:
Running
Running
刘鑫 commited on
Commit ·
ed56d7a
1
Parent(s): 09dc185
fix: pin Gradio NanoVLLM runtime dependencies
Browse filesAvoid the torch 2.11 CUDA 13 stack that breaks flash-attn builds on Spaces by pinning a more compatible torch/torchaudio/triton set and installing a pinned flash-attn wheel without dependency upgrades.
Made-with: Cursor
- app.py +3 -2
- requirements.txt +3 -3
app.py
CHANGED
|
@@ -82,7 +82,7 @@ def _ensure_nanovllm_runtime() -> None:
|
|
| 82 |
try:
|
| 83 |
import flash_attn # noqa: F401
|
| 84 |
except ImportError:
|
| 85 |
-
logger.info("Installing flash-attn at runtime ...")
|
| 86 |
subprocess.check_call(
|
| 87 |
[
|
| 88 |
sys.executable,
|
|
@@ -90,7 +90,8 @@ def _ensure_nanovllm_runtime() -> None:
|
|
| 90 |
"pip",
|
| 91 |
"install",
|
| 92 |
"--no-build-isolation",
|
| 93 |
-
"
|
|
|
|
| 94 |
]
|
| 95 |
)
|
| 96 |
|
|
|
|
| 82 |
try:
|
| 83 |
import flash_attn # noqa: F401
|
| 84 |
except ImportError:
|
| 85 |
+
logger.info("Installing pinned flash-attn at runtime ...")
|
| 86 |
subprocess.check_call(
|
| 87 |
[
|
| 88 |
sys.executable,
|
|
|
|
| 90 |
"pip",
|
| 91 |
"install",
|
| 92 |
"--no-build-isolation",
|
| 93 |
+
"--no-deps",
|
| 94 |
+
"flash-attn==2.6.3",
|
| 95 |
]
|
| 96 |
)
|
| 97 |
|
requirements.txt
CHANGED
|
@@ -2,9 +2,9 @@ gradio==6.0.0
|
|
| 2 |
huggingface-hub
|
| 3 |
funasr
|
| 4 |
numpy>=1.21.0
|
| 5 |
-
torch
|
| 6 |
-
torchaudio
|
| 7 |
-
triton
|
| 8 |
transformers>=4.51.0
|
| 9 |
xxhash
|
| 10 |
tqdm
|
|
|
|
| 2 |
huggingface-hub
|
| 3 |
funasr
|
| 4 |
numpy>=1.21.0
|
| 5 |
+
torch==2.5.1
|
| 6 |
+
torchaudio==2.5.1
|
| 7 |
+
triton==3.1.0
|
| 8 |
transformers>=4.51.0
|
| 9 |
xxhash
|
| 10 |
tqdm
|