phosphor-harness 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/quickstart.sh +9 -4
- package/scripts/run_service.sh +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phosphor-harness",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Local multimodal voice, vision and tool harness for Phosphor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {"type": "git", "url": "git+https://github.com/robit-man/phosphor-harness.git"},
|
package/pyproject.toml
CHANGED
package/quickstart.sh
CHANGED
|
@@ -107,10 +107,15 @@ else
|
|
|
107
107
|
fi
|
|
108
108
|
|
|
109
109
|
use_broker=no
|
|
110
|
-
if need docker
|
|
111
|
-
docker gpu discover
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
if need docker; then
|
|
111
|
+
if broker_status=$(docker gpu discover 2>&1); then
|
|
112
|
+
printf '%s\n' "$broker_status"
|
|
113
|
+
[[ "$gpu" == GPU-* ]] || fail "the GPU broker requires a physical GPU UUID"
|
|
114
|
+
use_broker=yes
|
|
115
|
+
elif [[ -d /usr/local/share/ollama-unify || ( "$broker_status" != *'unknown command: docker gpu'* &&
|
|
116
|
+
"$broker_status" != *"'gpu' is not a docker command"* ) ]]; then
|
|
117
|
+
fail "GPU broker discovery failed: $broker_status"
|
|
118
|
+
fi
|
|
114
119
|
elif [[ -d /usr/local/share/ollama-unify ]]; then
|
|
115
120
|
fail "this host requires docker gpu and its broker"
|
|
116
121
|
fi
|
package/scripts/run_service.sh
CHANGED
|
@@ -17,12 +17,14 @@ export PYTHONPATH="$code${PYTHONPATH:+:$PYTHONPATH}"
|
|
|
17
17
|
export PYTHONUNBUFFERED=1
|
|
18
18
|
pids=()
|
|
19
19
|
cleanup() {
|
|
20
|
+
unlink "$state/voice.ready" 2>/dev/null || :
|
|
20
21
|
for pid in "${pids[@]}"; do kill "$pid" 2>/dev/null || :; done
|
|
21
22
|
wait || :
|
|
22
23
|
}
|
|
23
24
|
trap cleanup EXIT
|
|
24
25
|
trap 'exit 0' TERM INT HUP
|
|
25
26
|
|
|
27
|
+
unlink "$state/voice.ready" 2>/dev/null || :
|
|
26
28
|
start() {
|
|
27
29
|
"$@" &
|
|
28
30
|
pids+=("$!")
|
|
@@ -51,7 +53,6 @@ with ExitStack() as stack:
|
|
|
51
53
|
raise SystemExit(f"Phosphor needs free loopback port {port}: {error}")
|
|
52
54
|
PY
|
|
53
55
|
mkdir -p "$state/workspace"
|
|
54
|
-
unlink "$state/voice.ready" 2>/dev/null || :
|
|
55
56
|
start "$tools_python" -m sophon_harness.portal_server \
|
|
56
57
|
--adapters "$sources/qwen_omni_adapters" --state "$state" --workspace "$state/workspace" "${camera[@]}"
|
|
57
58
|
ready http://127.0.0.1:18214/api/status "${pids[-1]}" 401
|