-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_python.sh
More file actions
executable file
·55 lines (45 loc) · 1.53 KB
/
setup_python.sh
File metadata and controls
executable file
·55 lines (45 loc) · 1.53 KB
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
#!/bin/bash
# Python environment setup script for AI-Critic
set -e # Exit on any error
echo "🐍 Setting up Python environment for AI-Critic"
# Check if python3.9 is available
if ! command -v python3.9 &> /dev/null; then
echo "❌ python3.9 not found. Please install Python 3.9:"
echo " sudo apt install python3.9 python3.9-venv python3.9-dev"
exit 1
fi
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment with Python 3.9..."
python3.9 -m venv venv
else
echo "✅ Virtual environment already exists"
fi
# Activate virtual environment
echo "🔌 Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip
# Install Python dependencies
echo "📚 Installing Python dependencies..."
cd src/python
pip install -r requirements.txt
# Install NVIDIA ACE SDK if wheel exists
if [ -f "../../workspace/proto/sample_wheel/nvidia_ace-1.2.0-py3-none-any.whl" ]; then
echo "🎯 Installing NVIDIA ACE SDK..."
pip install ../../workspace/proto/sample_wheel/nvidia_ace-1.2.0-py3-none-any.whl
else
echo "⚠️ NVIDIA ACE SDK wheel not found at workspace/proto/sample_wheel/"
echo " This is needed for Audio2Face integration"
fi
cd ../..
echo ""
echo "✅ Python environment setup complete!"
echo ""
echo "🚀 To use the environment:"
echo " source venv/bin/activate"
echo " python src/python/audio2face_unreal.py --help"
echo ""
echo "💡 To deactivate when done:"
echo " deactivate"