automated update: 2026-06-10 22:00:38
This commit is contained in:
+6
-19
@@ -2,29 +2,16 @@
|
||||
set -e
|
||||
export PYTHONUNBUFFERED=1
|
||||
|
||||
check_models() {
|
||||
echo "📦 Checking models..."
|
||||
# Paths updated to point to persistent root /models
|
||||
if [ -d "/models/.insightface/models/buffalo_l" ]; then
|
||||
echo " ✅ InsightFace Buffalo_L: present"
|
||||
else
|
||||
echo " ⬇️ InsightFace Buffalo_L: downloading..."
|
||||
fi
|
||||
echo "🚀 Starting if-curator..."
|
||||
}
|
||||
# 1. Run the job immediately on startup
|
||||
echo "▶ Running on startup..."
|
||||
uv run python -m if_curator.cli
|
||||
|
||||
AUTO="${AUTO_MODE:-false}"
|
||||
if [ "$AUTO" != "true" ] && [ ! -t 0 ]; then
|
||||
echo "❌ AUTO_MODE must be true for non-interactive execution."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
check_models
|
||||
# 2. If a schedule exists, start the scheduler
|
||||
if [ -n "${CRON_SCHEDULE:-}" ]; then
|
||||
echo "▶ CRON_SCHEDULE set to: $CRON_SCHEDULE"
|
||||
echo "▶ Switching to scheduled mode..."
|
||||
exec uv run python3 /app/scheduler.py
|
||||
else
|
||||
echo "▶ Running once..."
|
||||
uv run python -m if_curator.cli
|
||||
echo "▶ No schedule set, exiting."
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user