#!/usr/bin/env bash set -euo pipefail repo="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" cd -- "$repo" # This host uses exactly one Assistant protocol model. if [[ "${MKA_PROTOCOL_MODEL:-qwen3.8:27b}" != qwen3.8:27b ]]; then printf 'fertigungski requires MKA_PROTOCOL_MODEL=qwen3.8:27b.\n' >&2 exit 1 fi export MKA_PROTOCOL_MODEL=qwen3.8:27b # Keep this host on CPU until its Vulkan hardware validation is complete. export MKA_WHISPER_BACKEND="${MKA_WHISPER_BACKEND:-cpu}" case "$MKA_WHISPER_BACKEND" in cpu) default_executable=/opt/whisper.cpp/build/bin/whisper-cli ;; vulkan|auto) default_executable=/opt/whisper.cpp/build-vulkan/bin/whisper-cli ;; *) printf 'Invalid MKA_WHISPER_BACKEND: %s\n' "$MKA_WHISPER_BACKEND" >&2; exit 1 ;; esac export MKA_WHISPER_EXECUTABLE="${MKA_WHISPER_EXECUTABLE:-$default_executable}" export MKA_WHISPER_MODEL="${MKA_WHISPER_MODEL:-/opt/whisper.cpp/models/ggml-large-v3-turbo.bin}" export PYTHONPATH="$repo/src:$repo/../meeting-lab" export VIRTUAL_ENV="$repo/.venv" export PATH="$VIRTUAL_ENV/bin:$PATH" [[ -x "$repo/.venv/bin/streamlit" && -x "$MKA_WHISPER_EXECUTABLE" && -r "$MKA_WHISPER_MODEL" ]] || { printf 'Required Streamlit/Whisper executable or model is missing.\n' >&2 exit 1 } exec "$repo/.venv/bin/streamlit" run src/mka/ui/streamlit_app.py