Add RAG basic implementation
This commit is contained in:
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Container entry point.
|
||||
# serve run the API (default). With MIGRATE_ON_START=true it applies migrations first.
|
||||
# migrate wait for the database, apply migrations, exit (a one-shot job)
|
||||
# other passed to `python -m estimator`, e.g. `rag import /data/refs.csv`, `hash-password`
|
||||
set -eu
|
||||
|
||||
command="${1:-serve}"
|
||||
|
||||
case "$command" in
|
||||
serve)
|
||||
if [ "${MIGRATE_ON_START:-false}" = "true" ]; then
|
||||
python -m estimator wait-db --timeout "${DB_WAIT_TIMEOUT:-60}"
|
||||
python -m estimator migrate
|
||||
fi
|
||||
exec python -m estimator serve
|
||||
;;
|
||||
migrate)
|
||||
python -m estimator wait-db --timeout "${DB_WAIT_TIMEOUT:-60}"
|
||||
exec python -m estimator migrate "${2:-head}"
|
||||
;;
|
||||
*)
|
||||
exec python -m estimator "$@"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user