Spaces:
Sleeping
Sleeping
Upload scripts/entrypoint.sh with huggingface_hub
Browse files- scripts/entrypoint.sh +12 -5
scripts/entrypoint.sh
CHANGED
|
@@ -1,7 +1,14 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
echo "
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|