Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

feat: relocate engine venvs, aarch64 CUDA Docker build, install fallback docs, trim unused deps

velixio35bb7dfae7c0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index abbe0d4ad..2b4be372f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,10 +16,18 @@ metadata and the backend fallback mirror it.
- Preview iOS and Android companion apps: drive your own VoiceStudio from your phone (speak, voices and cloning, dubbing, dictation) after pairing by QR code; build from source for now ([guide](docs/mobile.md)) (#2965)
+- `OMNIVOICE_ENGINES_DIR` moves engine venvs and the audio.cpp runtime to another drive; the default location is unchanged (#PR)
+
### Docs
+- Install guides give a GitHub fallback command when `voicestudio.sh/install` is unreachable, and document building the Docker image on ARM64 + NVIDIA hosts (#PR)
+
- Contributor guides and the pull request template explain how to sign the CLA before opening a first pull request (#2676)
+### Fixed
+
+- The Docker image build skips the unavailable cuDNN 8 compatibility step on aarch64, so ARM64 + NVIDIA hosts can build a GPU image (#PR)
+
### CI
- Desktop request-guard self-tests stay deterministic when app requests arrive during cleanup (#2676)
diff --git a/README.md b/README.md
index 52869fe67..9f5b7e013 100644
--- a/README.md
+++ b/README.md
@@ -74,6 +74,14 @@ curl -fsSL https://voicestudio.sh/install | sh -s -- --uninstall
```
On Windows, run `irm https://voicestudio.sh/install | iex` in PowerShell.
+
+If `voicestudio.sh/install` is unreachable or returns 404, run the same script
+straight from the repository, or clone it and run `scripts/install.sh`:
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/debpalash/VoiceStudio/main/scripts/install.sh | sh
+```
+
Release downloads require curl and a SHA-256 tool. `--main` requires Git,
Node.js 22+, Bun, Rust/Cargo, and platform build tools; see
[installer prerequisites and behavior](docs/install/script.md).
diff --git a/backend/core/config.py b/backend/core/config.py
index e6904aa42..5e74778f5 100644
--- a/backend/core/config.py
+++ b/backend/core/config.py
@@ -65,6 +65,20 @@ _ensure_short_hf_cache_on_windows()
DATA_DIR = get_app_data_dir()
+
+
+def get_engines_dir(data_dir=None):
+ """Root of the managed engine installs (venvs, checkouts, audio.cpp runtime).
+
+ Defaults to ``DATA_DIR/engines`` so existing installs keep working. Set
+ ``OMNIVOICE_ENGINES_DIR`` to put these multi-GB trees on another drive
+ (e.g. keep a small C: drive free) while voices and projects stay in
+ ``DATA_DIR`` (#2683). Read at call time, so tests and late env restores work.
+ """
+ custom = (os.environ.get("OMNIVOICE_ENGINES_DIR") or "").strip()
+ if custom:
+ return os.path.abspath(os.path.expanduser(custom))
+ return os.path.join(DATA_DIR if data_dir is None else data_dir, "engines")
VOICES_DIR = os.path.join(DATA_DIR, "voices") # Reference audio for profiles
OUTPUTS_DIR = os.path.join(DATA_DIR, "outputs") # Generated audio files
DUB_DIR = os.path.join(DATA_DIR, "dub_jobs")
diff --git a/backend/engines/audiocpp/bootstrap.py b/backend/engines/audiocpp/bootstrap.py
index a8dcde379..f7ce42b45 100644
--- a/backend/engines/audiocpp/bootstrap.py
+++ b/backend/engines/audiocpp/bootstrap.py
@@ -309,9 +309,9 @@ def platform_slug() -> str:
def managed_runtime_dir() -> Path:
"""Update-surviving location for the checksummed app-managed runtime."""
- from core.config import DATA_DIR
+ from core.config import get_engines_dir
- return Path(DATA_DIR) / "engines" / "audio-cpp" / VERSION.lstrip("v") / _platform_slug()
+ return Path(get_engines_dir()) / "audio-cpp" / VERSION.lstrip("v") / _platform_slug()
def is_installed() -> bool:
diff --git a/backend/services/sidecar_install.py b/backend/services/sidecar_install.py
index e3e09d49d..97dda65f6 100644
--- a/backend/services/sidecar_install.py
+++ b/backend/services/sidecar_install.py
@@ -18,7 +18,7 @@ Design notes (single source of truth for the choices):
``pip install git+https://…`` path was rejected because the engine
*directory* must exist on disk anyway: the sidecar resolves its venv
and model weights relative to it.
-* **Managed install root:** ``DATA_DIR/engines/<engine_id>/`` — always
+* **Managed install root:** ``DATA_DIR/engines/<engine_id>/`` (or ``$OMNIVOICE_ENGINES_DIR/<engine_id>/``) — always
user-writable (works in frozen/packaged builds where ``backend/`` is
read-only), survives app updates, and never collides with a user's own
clone. A user-managed install (env var already pointing at their clone)
@@ -60,7 +60,7 @@ from dataclasses import dataclass, field
from pathlib import Path
from typing import Callable, Iterable, NamedTuple, Optional
-from core.config import DATA_DIR
+from core.config import DATA_DIR, get_engines_dir
from core.contained_subprocess import OwnedPopen, WindowsJobPopen, spawn_owned
logger = logging.getLogger("omnivoice.sidecar_install")
@@ -747,7 +747,7 @@ def persistent_env_vars() -> set[str]:
def managed_root(spec: SidecarSpec) -> Path:
"""Per-engine managed install root (checkout lives inside it)."""
- return Path(DATA_DIR) / "engines" / spec.engine_id
+ return Path(get_engines_dir(DATA_DIR)) / spec.engine_id
def managed_checkout(spec: SidecarSpec) -> Path:
@@ -1600,7 +1600,7 @@ def _step_create_venv(spec: SidecarSpec, job: dict) -> None:
# Keep uv's cache on the engines volume (D:-install class) — see
# uv_subprocess_env. The cache parent is the shared engines root, so
# every sidecar engine reuses one cache.
- uv_env = uv_subprocess_env(Path(DATA_DIR) / "engines")
+ uv_env = uv_subprocess_env(Path(get_engines_dir(DATA_DIR)))
rc = _run_logged(job, [uv, "venv", str(venv_dir), *spec.venv_args],
timeout=_UV_VENV_TIMEOUT_S, env=uv_env)
if rc != 0 or not py.is_file():
@@ -1648,7 +1648,7 @@ def _step_install_deps(spec: SidecarSpec, job: dict) -> None:
job,
[uv, "pip", "install", "--python", str(py), *target],
timeout=_UV_PIP_INSTALL_TIMEOUT_S,
- env=uv_subprocess_env(Path(DATA_DIR) / "engines"),
+ env=uv_subprocess_env(Path(get_engines_dir(DATA_DIR))),
)
if rc != 0:
if _output_shows_disk_full(job.get("_last_run_output") or ()):
diff --git a/backend/services/storage_report.py b/backend/services/storage_report.py
index 2a252a847..f3e23363e 100644
--- a/backend/services/storage_report.py
+++ b/backend/services/storage_report.py
@@ -58,9 +58,9 @@ def default_engines_dir() -> str:
IndexTTS-2 install silently rolled up into the data dir's "other" subtotal.
Mirrors ``backend/services/sidecar_install.py`` (`DATA_DIR/engines/<id>`).
"""
- from core.config import DATA_DIR
+ from core.config import get_engines_dir
- return str(Path(DATA_DIR) / "engines")
+ return str(Path(get_engines_dir()))
def _has_venv(entry_path: str) -> bool:
diff --git a/bun.lock b/bun.lock
index ab2414511..5ad446e82 100644
--- a/bun.lock
+++ b/bun.lock
@@ -18,7 +18,6 @@
"version": "0.0.0-electron",
"dependencies": {
"@base-ui/react": "^1.8.0",
- "@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/source-serif-4": "^5.3.0",
@@ -74,8 +73,6 @@
},
"devDependencies": {
"@tailwindcss/vite": "^4.3.3",
- "@tanstack/react-query-devtools": "^5.102.8",
- "@tanstack/react-router-devtools": "^1.167.2",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/node": "^24.13.4",
@@ -227,8 +224,6 @@
"@electron-internal/extract-zip": ["@electron-internal/[email protected]", "", {}, "sha512-+bqFCP98pLI0Tt0XQo1TmlXtwjWchISndDOxCkEcIuUgXWpBnLyRI+2DU+mesvnMMX6L1XDqYNA0lXNDHd/yiA=="],
- "@electron-toolkit/preload": ["@electron-toolkit/[email protected]", "", { "peerDependencies": { "electron": ">=13.0.0" } }, "sha512-TWWPToXd8qPRfSXwzf5KVhpXMfONaUuRAZJHsKthKgZR/+LqX1dZVSSClQ8OTAEduvLGdecljCsoT2jSshfoUg=="],
-
"@electron-toolkit/utils": ["@electron-toolkit/[email protected]", "", { "peerDependencies": { "electron": ">=13.0.0" } }, "sha512-qXSntwEzluSzKl4z5yFNBknmPGjPa3zFhE4mp9+h0cgokY5ornAeP+CJQDBhKsL1S58aOQfcwkD3NwLZCl+64g=="],
"@electron/asar": ["@electron/[email protected]", "", { "dependencies": { "commander": "^5.0.0", "glob": "^7.1.6", "minimatch": "^3.0.4" }, "bin": { "asar": "bin/asar.js" } }, "sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA=="],
@@ -737,20 +732,14 @@
"@tanstack/query-core": ["@tanstack/[email protected]", "", {}, "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg=="],
- "@tanstack/query-devtools": ["@tanstack/[email protected]", "", {}, "sha512-ZgeMKuF5d/zOE+tgWm3cSbD6Zcbr6IugVsnbHzUcSismqLZDSUPBKM6ILUxExgwe6rPAOox2x5bA5T+PSOQG0Q=="],
-
"@tanstack/react-form": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/form-core": "1.33.5", "@tanstack/react-store": "^0.11.0" }, "peerDependencies": { "@tanstack/react-start": "*", "react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@tanstack/react-start"] }, "sha512-LlRB28qJwO/QCGaHvWnbdh4haBgTFiZVmzA2uzxSBS3YA7/IqrQ6HOBK70CkFQ+DbflZ7NawsmSln13h5iIdTA=="],
"@tanstack/react-pacer": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/pacer": "0.22.0", "@tanstack/react-store": "^0.11.1" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-Ec3h+kT8kYlpGb1M8F7836q+udE/M2RmE8KLr1rhs+UDBgvxjfmyR2bIUeaDEe9Zn1YXNI986RbErXyr5fEJIg=="],
"@tanstack/react-query": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/query-core": "5.102.8" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A=="],
- "@tanstack/react-query-devtools": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/query-devtools": "5.102.8" }, "peerDependencies": { "@tanstack/react-query": "^5.102.8", "react": "^18 || ^19" } }, "sha512-QKb7A44BZOU7nxsGA4gFN1fofjYovar5O0T83Ff4Y+2eRq09RGFrAzzutVdF/6/emfSaMDohp6e759BjB3fxEw=="],
-
"@tanstack/react-router": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/history": "1.162.4", "@tanstack/react-store": "^0.11.0", "@tanstack/router-core": "1.171.30", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-AbgcI/xO8AJY1r6y5tF7TZyHH0VKm0XcfY3QVIVCrHq8k04Hkj1N4nfLL+1xCGC3VnMI3AYGAVWkatnqE2dxAQ=="],
- "@tanstack/react-router-devtools": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/router-devtools-core": "1.168.2" }, "peerDependencies": { "@tanstack/react-router": "^1.170.36", "@tanstack/router-core": "^1.171.30", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" }, "optionalPeers": ["@tanstack/router-core"] }, "sha512-VuoqB7OhDUrBa4WOFSKiAQ8xI8sJpeZdo9sYE1hQa89iMuVFUQu1iWE4iCiQhB+6TYOZDZ9e+iHKxYjop4ZVYw=="],
-
"@tanstack/react-store": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/store": "0.11.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-HaIGKI3YLmjBYIvy5DFDY23oNaYZIsTZfngey07Uh5iLVJgM3bIGCnZeOFOqzjFld9JHWcaHJnasD/bKoGKwJQ=="],
"@tanstack/react-table": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/table-core": "8.21.3" }, "peerDependencies": { "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww=="],
@@ -759,8 +748,6 @@
"@tanstack/router-core": ["@tanstack/[email protected]", "", { "dependencies": { "@tanstack/history": "1.162.4", "cookie-es": "^3.0.0", "seroval": "^1.6.2", "seroval-plugins": "^1.6.2" } }, "sha512-wtS1yCAb/k5CJBauvrCyqf2n4/kRc3aiz81tFBJ1QXH4Utsu81xFTMq15AdmNWgWmt2UstUSMfWi4Ua7ph2F+w=="],
- "@tanstack/router-devtools-core": ["@tanstack/[email protected]", "", { "dependencies": { "clsx": "^2.1.1", "goober": "^2.1.16" }, "peerDependencies": { "@tanstack/router-core": "^1.171.30", "csstype": "^3.0.10" }, "optionalPeers": ["csstype"] }, "sha512-pCCdQ5M/NUeWdiAbPmjyfcNdls6G4vaVlIQbPf1IqZk1FLYFr00aQvi578yUuWFBNM2KNS2QcwM1uPucbtGf5Q=="],
-
"@tanstack/store": ["@tanstack/[email protected]", "", {}, "sha512-mzTOBhypOuDJAy/D8n2MfUZ1HFkXnmSETviRyhqEC8LUE7/IZQExOTxMANj3KjTofYTkFNpBY67qaVrT41YccA=="],
"@tanstack/table-core": ["@tanstack/[email protected]", "", {}, "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg=="],
diff --git a/deploy/Dockerfile b/deploy/Dockerfile
index f0d7d1ac6..a2f576f3c 100644
--- a/deploy/Dockerfile
+++ b/deploy/Dockerfile
@@ -117,8 +117,10 @@ RUN python3 -c "import os, torch, torchaudio, torchvision; \
# cudnn8.py looks for <sys.prefix>/lib/pythonX.Y/site-packages/cudnn8_compat,
# and sys.prefix differs between the conda-based CUDA image and the ROCm venv.
# --no-deps keeps this to the cuDNN wheels alone, leaving the base image's torch
-# stack untouched. Skipped for ROCm, which does not use cuDNN.
-RUN if [ "$GPU_FLAVOR" = "cuda" ]; then \
+# stack untouched. Skipped for ROCm, which does not use cuDNN, and on aarch64
+# (DGX Spark / GH200 builds, #2831): NVIDIA publishes no aarch64 wheel of
+# nvidia-cudnn-cu12==8.9.7.29, so CTranslate2 ASR engines stay unavailable there.
+RUN if [ "$GPU_FLAVOR" = "cuda" ] && [ "$(uname -m)" != "aarch64" ]; then \
target="$(python3 -c "import os, sys; print(os.path.join(sys.prefix, 'lib', 'python%d.%d' % sys.version_info[:2], 'site-packages', 'cudnn8_compat'))")" && \
uv pip install --python "$(command -v python3)" --no-cache --no-deps \
--target "$target" nvidia-cudnn-cu12==8.9.7.29 && \
diff --git a/docs/install/docker.md b/docs/install/docker.md
index a7e1def15..15c63104e 100644
--- a/docs/install/docker.md
+++ b/docs/install/docker.md
@@ -32,6 +32,22 @@ On an ARM64 host, pulling without an explicit platform can fail with
below. This is an emulated CPU option, not native
ARM64 support; inference can be much slower and is not a GPU workaround.
Without emulation, use an AMD64 server for this Docker deployment.
+- **ARM64 + NVIDIA GPU (DGX Spark / GB10, GH200):** no image is published, but
+ `deploy/Dockerfile` builds natively. Prepare a base image from `ubuntu:24.04`
+ with `python3`, `torch==2.8.0` from the `cu129` PyTorch index (`cu128` has no
+ aarch64 2.8.0), `torchaudio==2.8.0` and `torchvision==0.23.0` installed with
+ `--no-deps`, plus apt `build-essential pkg-config cmake libopus-dev` (`sphn`
+ has no aarch64 wheel and builds against Opus). Then:
+
+ ```bash
+ docker build -f deploy/Dockerfile --build-arg BASE_IMAGE=<your-base> -t voicestudio:arm64-cuda .
+ ```
+
+ The Dockerfile skips the cuDNN 8 compatibility step on aarch64 because NVIDIA
+ ships no aarch64 wheel for it, so CTranslate2-based ASR engines (faster-whisper,
+ WhisperX) report unavailable; PyTorch engines such as OmniVoice, CosyVoice and
+ `pytorch-whisper` use the GPU. This recipe is community-validated on v0.5.6,
+ not a supported or CI-tested image.
## Image tags
diff --git a/docs/install/script.md b/docs/install/script.md
index b50e59e9d..68fa9d7ab 100644
--- a/docs/install/script.md
+++ b/docs/install/script.md
@@ -37,6 +37,13 @@ After downloading the script for inspection, the equivalent local commands are
## Release installation
+If `voicestudio.sh/install` is unreachable or returns 404, run the same script
+straight from the repository, or clone it and run `scripts/install.sh`:
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/debpalash/VoiceStudio/main/scripts/install.sh | sh
+```
+
Requires curl and `shasum` (included on macOS) or `sha256sum`. The installer
resolves the latest GitHub release tag, downloads the Electron DMG or AppImage,
and verifies its exact filename against that release's `SHA256SUMS.txt`.
diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md
index c5aa3d356..d26a71f3e 100644
--- a/docs/install/uninstall.md
+++ b/docs/install/uninstall.md
@@ -95,7 +95,7 @@ VoiceStudio through **Settings → Apps**, then run `-Yes` without `-RemoveApp`
to clean up its remaining data.
The script honors your custom locations: if you set `OMNIVOICE_DATA_DIR`,
-`OMNIVOICE_CACHE_DIR`, `HF_HOME`, or `HF_HUB_CACHE` (or picked custom
+`OMNIVOICE_CACHE_DIR`, `OMNIVOICE_ENGINES_DIR`, `HF_HOME`, or `HF_HUB_CACHE` (or picked custom
data/model folders during setup), export the same variables before running it
and it will target those instead of the defaults. It never touches anything
outside the VoiceStudio folders, and without `--app` / `-RemoveApp` it does
diff --git a/docs/install/windows.md b/docs/install/windows.md
index 22d8e70fe..9a8273efb 100644
--- a/docs/install/windows.md
+++ b/docs/install/windows.md
@@ -14,6 +14,22 @@ app (MSI installers) is no longer maintained; if you still run it, follow the
Python, FFmpeg, and model weights are bootstrapped by the app itself on first
launch; no toolchain is needed for the installer.
+## Keep engine environments off `C:`
+
+Engine environments (IndexTTS, CosyVoice, MOSS-TTS and other sidecars, plus the
+audio.cpp runtime) install under `<app data>\engines` and can reach several GB
+each. To place them on another drive, set `OMNIVOICE_ENGINES_DIR` before
+launching VoiceStudio, for example in PowerShell:
+
+```powershell
+[Environment]::SetEnvironmentVariable('OMNIVOICE_ENGINES_DIR', 'D:\VoiceStudio\engines', 'User')
+```
+
+Restart VoiceStudio afterwards. Voices, projects and settings stay in the data
+folder (`OMNIVOICE_DATA_DIR` moves that too). Engines already installed under the
+old folder are not moved: reinstall them from Engines, or move the
+`engines\<engine>` folder yourself and delete the old copy.
+
## Install
Download the installer matching your PC from the
diff --git a/electron/package.json b/electron/package.json
index e85229a56..330720715 100644
--- a/electron/package.json
+++ b/electron/package.json
@@ -37,7 +37,6 @@
},
"dependencies": {
"@base-ui/react": "^1.8.0",
- "@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/source-serif-4": "^5.3.0",
@@ -93,8 +92,6 @@
},
"devDependencies": {
"@tailwindcss/vite": "^4.3.3",
- "@tanstack/react-query-devtools": "^5.102.8",
- "@tanstack/react-router-devtools": "^1.167.2",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@types/node": "^24.13.4",
diff --git a/tests/test_docker_cudnn8_compat.py b/tests/test_docker_cudnn8_compat.py
index c6c0488f7..57850d8c6 100644
--- a/tests/test_docker_cudnn8_compat.py
+++ b/tests/test_docker_cudnn8_compat.py
@@ -11,9 +11,9 @@ ROOT = Path(__file__).resolve().parents[1]
@pytest.mark.parametrize('flavor,empty,success', [('cuda', False, True), ('rocm', False, True), ('cuda', True, False)])
-def test_compat_install_is_isolated_and_cuda_only(tmp_path, flavor, empty, success):
+def test_compat_install_is_isolated_and_cuda_only(tmp_path, flavor, empty, success, machine='x86_64'):
dockerfile = (ROOT / 'deploy/Dockerfile').read_text()
- match = re.search(r'RUN if \[ "\$GPU_FLAVOR" = "cuda" \]; then \\\n.*? fi', dockerfile, re.S)
+ match = re.search(r'RUN if \[ "\$GPU_FLAVOR" = "cuda" \] && \[ "\$\(uname -m\)" != "aarch64" \]; then \\\n.*? fi', dockerfile, re.S)
assert match, 'CUDA compatibility install is absent'
script = match[0].removeprefix('RUN ').replace('\\\n', '')
bindir = tmp_path / 'bin'
@@ -31,6 +31,7 @@ assert root.name == 'cudnn8_compat'
(root/'nvidia/cudnn/lib').mkdir(parents=True)
if not {empty!r}: (root/'nvidia/cudnn/lib/libcudnn_ops_infer.so.8').touch()
''')
+ (bindir / 'uname').write_text(f'#!/bin/sh\necho {machine}\n')
for p in bindir.iterdir(): p.chmod(0o755)
env = dict(os.environ, PATH=str(bindir)+os.pathsep+os.environ['PATH'], GPU_FLAVOR=flavor)
result = subprocess.run(['bash', '-c', script], env=env, capture_output=True, text=True)
@@ -40,3 +41,18 @@ if not {empty!r}: (root/'nvidia/cudnn/lib/libcudnn_ops_infer.so.8').touch()
assert expected.is_dir()
else:
assert not prefix.exists(), 'ROCm must not install NVIDIA libraries'
+
+
+def test_compat_install_is_skipped_on_aarch64(tmp_path):
+ """#2831: no aarch64 cuDNN 8 wheel exists, so a CUDA arm64 build must not fail on it."""
+ dockerfile = (ROOT / 'deploy/Dockerfile').read_text()
+ match = re.search(r'RUN if \[ "\$GPU_FLAVOR" = "cuda" \] && \[ "\$\(uname -m\)" != "aarch64" \]; then \\\n.*? fi', dockerfile, re.S)
+ script = match[0].removeprefix('RUN ').replace('\\\n', '')
+ bindir = tmp_path / 'bin'
+ bindir.mkdir()
+ (bindir / 'uname').write_text('#!/bin/sh\necho aarch64\n')
+ (bindir / 'uv').write_text('#!/bin/sh\nexit 99\n')
+ for p in bindir.iterdir():
+ p.chmod(0o755)
+ env = dict(os.environ, PATH=str(bindir) + os.pathsep + os.environ['PATH'], GPU_FLAVOR='cuda')
+ assert subprocess.run(['bash', '-c', script], env=env).returncode == 0
diff --git a/tests/test_sidecar_install.py b/tests/test_sidecar_install.py
index 264283858..900a02bf3 100644
--- a/tests/test_sidecar_install.py
+++ b/tests/test_sidecar_install.py
@@ -1969,3 +1969,13 @@ def test_corrupt_non_utf8_markers_read_as_absent_not_crash(monkeypatch):
(extra_dir / si._SOURCE_REVISION_MARKER).write_bytes(b"\xff\xfe\x80")
extra = si.ExtraSource("extra", "rev", "https://example.invalid/x.tar.gz", "needed.txt")
assert si._extra_source_present(extra, extra_dir) is False
+
+
+def test_engines_dir_env_relocates_managed_roots(monkeypatch, tmp_path):
+ """#2683: OMNIVOICE_ENGINES_DIR moves engine venvs off the data drive."""
+ spec = next(iter(si.SPECS.values()))
+ default_root = si.managed_root(spec)
+ assert default_root == Path(si.DATA_DIR) / "engines" / spec.engine_id
+ elsewhere = tmp_path / "bigdrive"
+ monkeypatch.setenv("OMNIVOICE_ENGINES_DIR", str(elsewhere))
+ assert si.managed_root(spec) == elsewhere / spec.engine_id