File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ set -euo pipefail
55SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
66REPO_ROOT=" $( cd " ${SCRIPT_DIR} /../.." && pwd) "
77AI_PROJECT_ROOT=" ${REPO_ROOT} /ai"
8+ UV_BIN=" ${UV_BIN:- $(command -v uv || true)} "
89
910require_env () {
1011 local name=" $1 "
@@ -19,6 +20,24 @@ require_env HINDSIGHT_LOCAL_DB_PATH
1920require_env LOCAL_MEMORY_ACTOR_TOKENS_JSON
2021require_env LOCAL_MEMORY_ACTOR_POLICIES_JSON
2122
23+ if [[ -z " ${UV_BIN} " ]]; then
24+ for candidate in \
25+ /home/linuxbrew/.linuxbrew/bin/uv \
26+ /usr/local/bin/uv \
27+ /usr/bin/uv
28+ do
29+ if [[ -x " ${candidate} " ]]; then
30+ UV_BIN=" ${candidate} "
31+ break
32+ fi
33+ done
34+ fi
35+
36+ if [[ -z " ${UV_BIN} " || ! -x " ${UV_BIN} " ]]; then
37+ echo " Could not find an executable uv binary. Set UV_BIN explicitly." >&2
38+ exit 1
39+ fi
40+
2241if [[ " ${MEMORY_PROVIDER} " != " local_hindsight" ]]; then
2342 echo " MEMORY_PROVIDER must be local_hindsight, got: ${MEMORY_PROVIDER} " >&2
2443 exit 1
3251
3352export PYTHONPATH=" ${REPO_ROOT} :${PYTHONPATH:- } "
3453
35- exec uv run --project " ${AI_PROJECT_ROOT} " python -m uvicorn \
54+ exec " ${UV_BIN} " run --project " ${AI_PROJECT_ROOT} " python -m uvicorn \
3655 ai.api.mcp_server.memory_server:app \
3756 --host " ${MEMORY_SERVER_HOST:- 127.0.0.1} " \
3857 --port " ${MEMORY_SERVER_PORT:- 5003} "
You can’t perform that action at this time.
0 commit comments