-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_venv.sh
More file actions
executable file
·66 lines (52 loc) · 1.87 KB
/
install_venv.sh
File metadata and controls
executable file
·66 lines (52 loc) · 1.87 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
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
set -e # Exit on any error
echo "🚀 Installing CLAPS with Python venv (no conda needed)..."
CLAPS_DIR=$(pwd)
if ! command -v python3.10 &> /dev/null; then
echo "❌ Python 3.10 is required but not found. Please install Python 3.10."
exit 1
fi
PYTHON_VERSION=$(python3.10 --version | cut -d' ' -f2 | cut -d'.' -f1,2)
echo "✅ Python version check passed: $(python3.10 --version)"
echo "📦 Initializing git submodules..."
git submodule update --init --recursive
echo "🐍 Creating Python virtual environment..."
if [ -d "venv" ]; then
echo "⚠️ Virtual environment already exists. Removing old one..."
rm -rf venv
fi
python3.10 -m venv venv
echo "🔧 Activating virtual environment..."
source venv/bin/activate
echo "📦 Upgrading pip..."
pip install --upgrade pip
# Check if CUDA is available and install PyTorch accordingly
echo "🔍 Checking for CUDA support..."
if command -v nvidia-smi &> /dev/null; then
echo "✅ CUDA detected. Installing PyTorch with CUDA support..."
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
else
echo "ℹ️ No CUDA detected. Installing CPU-only PyTorch..."
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
fi
echo "📦 Installing core dependencies..."
pip install numpy scipy matplotlib plotly tqdm pyyaml
pip install pyvista rerun-sdk h5py cgal alphashape opencv-python
pip install lcm # For processing real MBot data from .lcm log files
echo "📦 Installing luis_utils..."
cd external/luis_utils
pip install -e .
cd $CLAPS_DIR
echo "📦 Installing pymatlie..."
cd external/pymatlie
pip install -e .
cd $CLAPS_DIR
echo "📦 Installing CLAPS package..."
pip install -e .
echo "✅ Installation complete!"
echo ""
echo "📝 Virtual environment created: venv/"
echo ""
echo "🚀 To use CLAPS:"
echo " source venv/bin/activate"
echo ""