| #!/bin/bash |
| set -e |
|
|
| echo "==========================================" |
| echo "VINE Demo Setup Script for HuggingFace Spaces" |
| echo "==========================================" |
|
|
| |
| echo "Installing system dependencies..." |
| apt-get update -qq |
| apt-get install -y -qq ffmpeg |
|
|
| |
| echo "Installing additional Python packages..." |
| pip install --no-cache-dir flax openai |
| pip install --no-cache-dir spacy spacy_fastlang |
| pip install --no-cache-dir decord |
|
|
| |
| echo "Downloading spacy language model..." |
| python -m spacy download en_core_web_lg |
|
|
| |
| echo "Installing local packages in editable mode..." |
|
|
| |
| if [ -d "src/video-sam2" ]; then |
| echo "Installing video-sam2..." |
| pip install --no-cache-dir -e src/video-sam2 |
| fi |
|
|
| |
| if [ -d "src/LASER" ]; then |
| echo "Installing LASER..." |
| pip install --no-cache-dir -e src/LASER |
| fi |
|
|
| |
| if [ -d "src/vine_hf" ]; then |
| echo "Installing vine_hf..." |
| pip install --no-cache-dir -e src/vine_hf |
| fi |
|
|
| |
| if [ -d "src/GroundingDINO" ]; then |
| echo "Installing GroundingDINO..." |
| pip install --no-cache-dir -e src/GroundingDINO |
|
|
| echo "Building GroundingDINO C++ extensions (will show warnings if CUDA unavailable)..." |
| cd src/GroundingDINO |
| python setup.py build_ext --inplace 2>&1 | tail -20 |
| cd ../.. |
| fi |
|
|
| echo "==========================================" |
| echo "Setup complete!" |
| echo "==========================================" |
|
|