Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

security: fix command injection in cookiecutter GPU detection hook (#1946)

LearningCircuitd2eec5d009f4
diff --git a/cookiecutter-docker/hooks/pre_prompt.py b/cookiecutter-docker/hooks/pre_prompt.py
index 8c1f39c377..4323d6aa98 100644
--- a/cookiecutter-docker/hooks/pre_prompt.py
+++ b/cookiecutter-docker/hooks/pre_prompt.py
@@ -32,11 +32,13 @@ def check_gpu_linux(context: Dict[str, Any]) -> None:
context: The context dictionary to update with GPU information.
"""
- result = subprocess.run(["lspci"], capture_output=True, text=True)
- vga_lines = [
- line for line in result.stdout.splitlines() if "vga" in line.lower()
- ]
- gpu_info = "\n".join(vga_lines)
+ try:
+ result = subprocess.run(["lspci"], capture_output=True, text=True)
+ gpu_info = "\n".join(
+ line for line in result.stdout.splitlines() if "vga" in line.lower()
+ )
+ except FileNotFoundError:
+ gpu_info = ""
if "NVIDIA" in gpu_info:
print("Detected an Nvidia GPU.")