File size: 1,025 Bytes
b1d8e61
 
 
 
 
 
 
 
182d8ee
b1d8e61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

echo "Starting container..."

# 🔐 HF login
hf auth login --token $HF_TOKEN

# 📥 Download dataset
hf download vidbye/Termux-DB --repo-type dataset --local-dir .
# 📦 Run apt-run.txt যদি থাকে
FILE="apt-run.txt"

if [ -f "$FILE" ]; then
    echo "Running commands from $FILE..."

    while IFS= read -r cmd || [ -n "$cmd" ]
    do
        # skip empty lines
        [ -z "$cmd" ] && continue

        echo "Running: $cmd"

        # run command (fail হলেও stop করবে না)
        bash -c "$cmd"

        # শুধু status print করবে
        if [ $? -ne 0 ]; then
            echo "⚠️ Failed (ignored): $cmd"
        else
            echo "✅ Success: $cmd"
        fi

        echo "----------------------"

    done < "$FILE"
else
    echo "No apt-run.txt found, skipping..."
fi

# 🔄 Start auto sync (background)
nohup bash hf_sync.sh > hf_sync.log 2>&1 &

# 🚀 Start API server (main process)
exec python3 -m uvicorn app:app --host 0.0.0.0 --port 7860