tao-shen commited on
Commit
4860b09
·
verified ·
1 Parent(s): f96707a

Upload scripts/entrypoint.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/entrypoint.sh +10 -8
scripts/entrypoint.sh CHANGED
@@ -1,11 +1,13 @@
1
  #!/bin/bash
2
- set -e
3
 
4
- echo "[PARENT] 🛠️ Preparing environment for Cain..."
5
- mkdir -p /data/logs
6
- mkdir -p /data/memory
7
- mkdir -p /data/workspace
8
- echo "[PARENT] ✅ Directory structure created."
9
 
10
- echo "[PARENT] 🚀 Launching Cain..."
11
- python cain.py
 
 
 
 
 
 
1
  #!/bin/bash
 
2
 
3
+ # SURVIVAL FIX: Ensure Python environment is clean and paths are set
4
+ export PYTHONPATH="${PYTHONPATH}:/home/user/app"
5
+ export GRADIO_SERVER_NAME="0.0.0.0"
 
 
6
 
7
+ # Fail-safe: Create a dummy .env if it doesn't exist to prevent load errors
8
+ if [ ! -f /home/user/app/.env ]; then
9
+ echo "HF_TOKEN=\n" > /home/user/app/.env
10
+ fi
11
+
12
+ # Execute the passed command (usually "python app.py" or "python launcher.py")
13
+ exec "$@"