-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·61 lines (48 loc) · 1.62 KB
/
setup.sh
File metadata and controls
executable file
·61 lines (48 loc) · 1.62 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
#!/bin/bash
set -e
echo "================================================"
echo "CDMAM RST - Installation Script"
echo "================================================"
echo ""
# Check Python version
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}')
REQUIRED_VERSION="3.10"
if [[ $(echo -e "$PYTHON_VERSION\n$REQUIRED_VERSION" | sort -V | head -n1) != "$REQUIRED_VERSION" ]]; then
echo "ERROR: Python 3.10+ required. You have $PYTHON_VERSION"
exit 1
fi
echo "✓ Python version: $PYTHON_VERSION"
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "ERROR: pip3 is not installed. Install with: sudo apt install python3-pip"
exit 1
fi
echo "✓ pip3 is installed"
# Check if virtualenv is available
if ! python3 -m venv --help &> /dev/null; then
echo "Installing python3-venv..."
sudo apt install python3-venv
fi
echo "✓ python3-venv is available"
echo ""
# Create virtual environment
echo "Creating virtual environment..."
python3 -m venv venv
source venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo "Installing dependencies (this may take a few minutes)..."
pip install -r requirements.txt
echo ""
echo "================================================"
echo "✓ Installation complete!"
echo "================================================"
echo ""
echo "To use the tool:"
echo " 1. Activate environment: source venv/bin/activate"
echo " 2. Run analysis: python scripts/run_cv.py -m models/MODEL.ckpt -d DATA_DIR"
echo ""
echo "To deactivate environment: deactivate"
echo "================================================"