Use uv venv for embedding, pre-download model in Docker build

- Use /app/venv with uv instead of system python/pip
- Pre-download all-MiniLM-L6-v2 model during Docker build

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 08:33:21 +00:00
parent fbf636868c
commit ddbe61818b
2 changed files with 4 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ impl KbManager {
async fn compute_embeddings(texts: &[String]) -> Result<Vec<Vec<f32>>> {
let input = serde_json::json!({ "texts": texts });
let mut child = tokio::process::Command::new("python3")
let mut child = tokio::process::Command::new("/app/venv/bin/python")
.arg("/app/scripts/embed.py")
.stdin(Stdio::piped())
.stdout(Stdio::piped())