tao-shen commited on
Commit
88c4342
·
verified ·
1 Parent(s): 0e5312b

Upload scripts/entrypoint.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/entrypoint.sh +12 -5
scripts/entrypoint.sh CHANGED
@@ -1,7 +1,14 @@
1
  #!/bin/bash
2
- # Entrypoint for Cain
3
- set -e
 
4
 
5
- echo "🚀 Starting Cain..."
6
- # Run the application
7
- exec python app.py
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+ # CRITICAL STARTUP LOGGING
3
+ # This script logs the immediate startup state to /data before the python app loads.
4
+ # This helps diagnose if the container starts but the python app crashes silently.
5
 
6
+ echo "[$(date)] ENTRYPOINT: Starting container initialization..." >> /data/startup_log.txt
7
+ echo "[$(date)] ENTRYPOINT: Python version:" >> /data/startup_log.txt
8
+ python --version >> /data/startup_log.txt 2>&1
9
+ echo "[$(date)] ENTRYPOINT: Installing requirements..." >> /data/startup_log.txt
10
+ pip install -r requirements.txt >> /data/startup_log.txt 2>&1
11
+ echo "[$(date)] ENTRYPOINT: Starting application..." >> /data/startup_log.txt
12
+
13
+ # Run the application and capture ALL output
14
+ python app.py >> /data/startup_log.txt 2>&1