File size: 1,614 Bytes
888f9e4
c77348c
888f9e4
 
c77348c
888f9e4
 
c77348c
 
 
 
888f9e4
c77348c
 
 
 
 
888f9e4
c77348c
 
 
888f9e4
c77348c
 
888f9e4
c77348c
 
 
 
888f9e4
 
c77348c
 
 
 
888f9e4
 
c77348c
 
 
 
888f9e4
 
c77348c
 
 
 
888f9e4
c77348c
 
 
 
888f9e4
 
 
c77348c
888f9e4
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e

echo "=========================================="
echo "VINE Demo Setup Script for HuggingFace Spaces"
echo "=========================================="

# Install system dependencies
echo "Installing system dependencies..."
apt-get update -qq
apt-get install -y -qq ffmpeg

# Install additional required packages
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

# Download spacy language model
echo "Downloading spacy language model..."
python -m spacy download en_core_web_lg

# Install local packages in editable mode from src/
echo "Installing local packages in editable mode..."

# Install video-sam2
if [ -d "src/video-sam2" ]; then
    echo "Installing video-sam2..."
    pip install --no-cache-dir -e src/video-sam2
fi

# Install LASER
if [ -d "src/LASER" ]; then
    echo "Installing LASER..."
    pip install --no-cache-dir -e src/LASER
fi

# Install vine_hf
if [ -d "src/vine_hf" ]; then
    echo "Installing vine_hf..."
    pip install --no-cache-dir -e src/vine_hf
fi

# Install GroundingDINO and build C++ extensions
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 "=========================================="