Mercurial
diff dictation/launcher.sh @ 275:78699f810817
Add Qwen3-VL and WebRTC dictation services
Add Bazel targets for the CUDA-backed Qwen3-VL server and a local WebRTC faster-whisper dictation service.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: e3d8cb06-6c95-4ae0-9757-651d3796ab00
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 10:58:47 -0700 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dictation/launcher.sh Mon Aug 17 10:58:47 2026 -0700 @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -euo pipefail + +binary="$1" +command="$2" +shift 2 + +if [[ -z "${RUNFILES_DIR:-}" && -d "$0.runfiles" ]]; then + RUNFILES_DIR="$0.runfiles" +fi +if [[ -z "${RUNFILES_DIR:-}" ]]; then + echo "Bazel runfiles are unavailable." >&2 + exit 1 +fi + +find_library_dir() { + local name="$1" + local path + path="$(find -L "$RUNFILES_DIR" -name "$name" -print -quit)" + if [[ -z "$path" ]]; then + echo "Unable to find $name in Bazel runfiles." >&2 + exit 1 + fi + dirname "$path" +} + +cublas_dir="$(find_library_dir libcublas.so.12)" +cudnn_dir="$(find_library_dir libcudnn.so.9)" +export LD_LIBRARY_PATH="$cublas_dir:$cudnn_dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + +if [[ "$binary" != /* ]]; then + binary="$RUNFILES_DIR/_main/$binary" +fi + +exec "$binary" "$command" "$@"