File size: 1,166 Bytes
905b8ff
c8d287d
905b8ff
c8d287d
 
 
 
 
c7b063e
905b8ff
c8d287d
 
 
 
 
 
 
 
 
 
 
c7b063e
 
3e6e915
c8d287d
 
 
 
 
 
 
 
 
 
1b1eb9f
c8d287d
 
 
1b1eb9f
c8d287d
1b1eb9f
c8d287d
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
#!/bin/bash
set -e  # Stop script immediately on error

echo "πŸš€ Starting Hugging Face Space build"
echo "------------------------------------"

# Step 1 β€” Upgrade pip
echo "⬆️  Upgrading pip..."
python -m pip install --upgrade pip

# Step 2 β€” Install Python dependencies
if [ -f requirements.txt ]; then
    echo "πŸ“¦ Installing dependencies from requirements.txt..."
    pip install --no-cache-dir -r requirements.txt
else
    echo "❌ ERROR: requirements.txt not found in repo root!"
    exit 1
fi

# Step 3 β€” Create cache/temp directories
echo "πŸ“‚ Creating cache and temp directories..."
mkdir -p model_cache tmp
chmod -R 777 model_cache tmp

# Step 4 β€” Verify moviepy installation
echo "πŸ” Verifying moviepy installation..."
python - << 'EOF'
try:
    import moviepy.editor
    print("βœ… moviepy is installed and working")
except ImportError as e:
    print("❌ moviepy is NOT installed!")
    raise e
EOF

# Step 5 β€” Show installed packages
echo "------------------------------------"
echo "πŸ“‹ Installed Python packages:"
pip list
echo "------------------------------------"

echo "βœ… Build complete β€” environment ready to launch!"