multimodal_module / install.sh
Princeaka's picture
Update install.sh
c8d287d verified
raw
history blame
1.17 kB
#!/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!"