Princeaka commited on
Commit
c8d287d
Β·
verified Β·
1 Parent(s): 3240f66

Update install.sh

Browse files
Files changed (1) hide show
  1. install.sh +32 -8
install.sh CHANGED
@@ -1,18 +1,42 @@
1
  #!/bin/bash
2
- set -e
3
 
4
- echo "πŸš€ Installing dependencies..."
 
 
 
 
5
  python -m pip install --upgrade pip
6
- pip install --no-cache-dir -r requirements.txt
7
 
 
 
 
 
 
 
 
 
 
 
 
8
  mkdir -p model_cache tmp
9
  chmod -R 777 model_cache tmp
10
 
11
- # Quick check to confirm moviepy works
12
- python -c "import moviepy.editor; print('βœ… moviepy is installed and working')"
 
 
 
 
 
 
 
 
13
 
14
- # Show installed packages
15
- echo "πŸ“‹ Installed packages:"
 
16
  pip list
 
17
 
18
- echo "βœ… Installation complete!"
 
1
  #!/bin/bash
2
+ set -e # Stop script immediately on error
3
 
4
+ echo "πŸš€ Starting Hugging Face Space build"
5
+ echo "------------------------------------"
6
+
7
+ # Step 1 β€” Upgrade pip
8
+ echo "⬆️ Upgrading pip..."
9
  python -m pip install --upgrade pip
 
10
 
11
+ # Step 2 β€” Install Python dependencies
12
+ if [ -f requirements.txt ]; then
13
+ echo "πŸ“¦ Installing dependencies from requirements.txt..."
14
+ pip install --no-cache-dir -r requirements.txt
15
+ else
16
+ echo "❌ ERROR: requirements.txt not found in repo root!"
17
+ exit 1
18
+ fi
19
+
20
+ # Step 3 β€” Create cache/temp directories
21
+ echo "πŸ“‚ Creating cache and temp directories..."
22
  mkdir -p model_cache tmp
23
  chmod -R 777 model_cache tmp
24
 
25
+ # Step 4 β€” Verify moviepy installation
26
+ echo "πŸ” Verifying moviepy installation..."
27
+ python - << 'EOF'
28
+ try:
29
+ import moviepy.editor
30
+ print("βœ… moviepy is installed and working")
31
+ except ImportError as e:
32
+ print("❌ moviepy is NOT installed!")
33
+ raise e
34
+ EOF
35
 
36
+ # Step 5 β€” Show installed packages
37
+ echo "------------------------------------"
38
+ echo "πŸ“‹ Installed Python packages:"
39
  pip list
40
+ echo "------------------------------------"
41
 
42
+ echo "βœ… Build complete β€” environment ready to launch!"