Disable semantic search by default (#12568)

* Disable semantic search by default and don't start processes unless enabled

* Conditionally create embeddings

* Fix typing
This commit is contained in:
Nicolas Mowen
2024-08-03 21:06:20 -06:00
parent 690ee3dc15
commit 3abf89596a
5 changed files with 50 additions and 5 deletions

View File

@@ -9,8 +9,19 @@ set -o errexit -o nounset -o pipefail
# Tell S6-Overlay not to restart this service
s6-svc -O .
echo "[INFO] Starting ChromaDB..."
search_enabled=`python3 /usr/local/semantic_search/get_search_settings.py | jq -r .enabled`
# Replace the bash process with the Frigate process, redirecting stderr to stdout
exec 2>&1
exec /usr/local/chroma run --path /config/chroma --host 127.0.0.1
if [[ "$search_enabled" == 'true' ]]; then
echo "[INFO] Starting ChromaDB..."
exec /usr/local/chroma run --path /config/chroma --host 127.0.0.1
else
while true
do
sleep 9999
continue
done
exit 0
fi