diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 8ab1f28..2897294 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -63,7 +63,9 @@ "Bash(echo \"Desktop: $XDG_CURRENT_DESKTOP\")", "Bash(nvidia-smi)", "Bash(lspci)", - "Bash(pacman -Q)" + "Bash(pacman -Q)", + "Bash(/run/media/chk/Ventoy/projects/chrka/whisper-dictation/.venv-linux/bin/pip install:*)", + "Bash(.venv-linux/bin/python build.py)" ] } } diff --git a/README.md b/README.md index 7f7aed3..99ca4c0 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,9 @@ Arch/CachyOS: sudo pacman -S nvidia cuda ``` -Without CUDA, the app runs on CPU. Use `int8` compute type and a smaller model (`small` or `base`) for acceptable speed on CPU. +Note: The system CUDA package may install a newer version (e.g. CUDA 13) than what faster-whisper/ctranslate2 requires (CUDA 12). The CUDA 12 runtime libraries (`nvidia-cublas-cu12`, `nvidia-cudnn-cu12`) are installed via pip in the virtual environment and bundled into the PyInstaller build, so the system CUDA version does not matter for the app itself. The system `nvidia` + `cuda` packages are only needed for the GPU driver and kernel module. + +Without an NVIDIA GPU, the app runs on CPU. Use `int8` compute type and a smaller model (`small` or `base`) for acceptable speed on CPU. **Python:** - Python 3.10+ diff --git a/install.sh b/install.sh index abd7cc8..b40f7b4 100644 --- a/install.sh +++ b/install.sh @@ -8,8 +8,8 @@ python3 -m venv --system-site-packages .venv-linux echo "Installing dependencies..." .venv-linux/bin/pip install --upgrade pip .venv-linux/bin/pip install -r requirements.txt +.venv-linux/bin/pip install -r requirements-cuda.txt .venv-linux/bin/pip install pyinstaller -# CUDA: uses system-installed CUDA libs (no pip CUDA packages needed) echo "" echo "Done. Run ./start.sh to launch, or ./build-linux.sh to create a standalone build." diff --git a/whisper-dictation.spec b/whisper-dictation.spec index a5938c5..9342827 100644 --- a/whisper-dictation.spec +++ b/whisper-dictation.spec @@ -16,13 +16,18 @@ _platform_tag = 'windows' if _is_windows else 'linux' # ── Platform-specific binaries ──────────────────────────────────────────────── _binaries = [] +_sp = next(p for p in site.getsitepackages() if p.endswith('site-packages')) +_nvidia = os.path.join(_sp, 'nvidia') if _is_windows: - _sp = next(p for p in site.getsitepackages() if p.endswith('site-packages')) - _nvidia = os.path.join(_sp, 'nvidia') _binaries = [ (os.path.join(_nvidia, 'cublas', 'bin', '*.dll'), '.'), (os.path.join(_nvidia, 'cudnn', 'bin', '*.dll'), '.'), ] +else: + _binaries = [ + (os.path.join(_nvidia, 'cublas', 'lib', 'libcublas.so*'), '.'), + (os.path.join(_nvidia, 'cudnn', 'lib', 'libcudnn.so*'), '.'), + ] # ── Platform-specific hidden imports ────────────────────────────────────────── _hiddenimports = [