Skip to content

Commit d3aea1a

Browse files
committed
fix(setup): pre-install torch so flash-attn can build (v0.1.1)
nano-vllm-voxcpm pulls in flash-attn, which needs torch importable at build time. pip's default PEP 517 build isolation gives it an empty sandbox, so the setup from v0.1.0 died at first install with "ModuleNotFoundError: No module named 'torch'". Fix: * setup.sh pre-installs torch + torchaudio before the main requirements pass. * requirements.txt drops the torch/torchaudio pins so they come only from the pre-install step; avoids double-resolve and version conflicts. * The main requirements install now uses --no-build-isolation so flash-attn picks up torch from the venv. v0.1.0 never actually installed end-to-end on a clean machine; v0.1.1 is the first release that does.
1 parent 8ed4603 commit d3aea1a

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.1] - 2026-04-17
9+
10+
### Fixed
11+
- `setup.sh` failed during `pip install -r requirements.txt` because
12+
`flash-attn` (a transitive dep of `nano-vllm-voxcpm`) requires
13+
`torch` at build time, but pip's default PEP 517 build-isolation
14+
sandbox does not have it. `setup.sh` now pre-installs torch and
15+
torchaudio, then runs `pip install --no-build-isolation -r
16+
requirements.txt` so flash-attn picks up the torch in the venv.
17+
`requirements.txt` drops the torch pins (they live in the
18+
pre-install step).
19+
20+
v0.1.0 never made it past the first install on a clean machine; this
21+
is the first release that actually installs end-to-end.
22+
823
## [0.1.0] - 2026-04-17
924

1025
First scaffold release. Pre-alpha — active development. API surface may

requirements.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# nano-vllm-voxcpm pulls in its own torch/vLLM/kernel stack. Pin to a
22
# tested commit/version once the project publishes one; for now we
33
# depend on the PyPI release.
4+
#
5+
# IMPORTANT: torch and torchaudio must already be installed before this
6+
# file is processed, because nano-vllm-voxcpm -> flash-attn needs torch
7+
# at build time. See setup.sh for the two-step install that handles it.
48
nano-vllm-voxcpm>=2.0.0
59
huggingface-hub>=0.20.0
6-
torch>=2.5.0
7-
torchaudio>=2.5.0
810

911
# Audio IO + format conversion.
1012
soundfile>=0.12.0

setup.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,18 @@ $PYTHON_BIN -m venv venv
2121
source venv/bin/activate
2222

2323
echo "[*] Installing build-time dependencies..."
24-
pip install --upgrade pip setuptools wheel
24+
pip install --upgrade pip setuptools wheel packaging
25+
26+
# flash-attn is a transitive dependency of nano-vllm-voxcpm. Its build
27+
# system requires torch to be importable in the build environment, but
28+
# pip's default PEP 517 build isolation provides an empty env. So we
29+
# install torch first, then the rest with --no-build-isolation so flash-attn
30+
# picks up torch from the venv.
31+
echo "[*] Pre-installing torch (required before flash-attn can build)..."
32+
pip install "torch>=2.5.0,<2.10.0" "torchaudio>=2.5.0,<2.10.0"
2533

2634
echo "[*] Installing core dependencies from requirements.txt (may take several minutes)..."
27-
pip install -r requirements.txt
35+
pip install --no-build-isolation -r requirements.txt
2836

2937
if [ -f "./setup_assets.sh" ]; then
3038
echo "[*] Python environment ready. Handing over to setup_assets.sh..."

0 commit comments

Comments
 (0)