Release / release (push) Successful in 12m32s
Kaname keeps two jobs: the model downloader and benchmarks. Benchmarks now run against endpoints (any OpenAI-compatible server added by URL, with an optional server-side API key and hand-written hardware notes) instead of deployments Kaname started itself. Removed: runtimes, deployments, sweeps, resource telemetry, hardware detection, the /api/v1 API with tokens and guardrails, and all Docker access. The quality eval's coding tests run in a network-less sandbox container that shares only an exchange folder with the worker. The previous state is kept in branch backup / tag backup-0.14.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
938 B
Bash
35 lines
938 B
Bash
#!/bin/sh
|
|
# Usage: docker run <image> [web|worker|sandbox|<any command>] (default: web)
|
|
set -e
|
|
|
|
role="${1:-web}"
|
|
|
|
require_writable() {
|
|
if ! touch "$1/.write-test" 2>/dev/null; then
|
|
echo "ERROR: $1 is not writable by uid $(id -u). On the host: chown -R $(id -u):$(id -g) <folder mounted at $1>" >&2
|
|
exit 1
|
|
fi
|
|
rm -f "$1/.write-test"
|
|
}
|
|
|
|
case "$role" in
|
|
web|worker)
|
|
echo "$role" > /tmp/kaname-role
|
|
require_writable /data
|
|
if [ "$role" = worker ]; then require_writable "${MODELS_DIR:-/models}"; fi
|
|
# web and worker usually start together; the lock makes sure only one runs the migrations.
|
|
flock /data/.migrate.lock node dist/migrate.mjs
|
|
;;
|
|
esac
|
|
|
|
case "$role" in
|
|
web) exec node_modules/.bin/next start ;;
|
|
worker) exec node dist/worker.mjs ;;
|
|
sandbox)
|
|
echo sandbox > /tmp/kaname-role
|
|
require_writable "${SANDBOX_DIR:-/sandbox}"
|
|
exec node dist/sandbox.mjs
|
|
;;
|
|
*) exec "$@" ;;
|
|
esac
|