automated update: 2026-06-10 22:00:38

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