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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user