-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·72 lines (61 loc) · 1.63 KB
/
setup.sh
File metadata and controls
executable file
·72 lines (61 loc) · 1.63 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
67
68
69
70
71
72
#!/bin/bash
# Setup script for Practical MLOps project
# Usage: bash setup.sh
set -e
echo "🚀 Setup Practical MLOps Project"
echo "=================================="
echo ""
# Check Python version
echo "Checking Python version..."
python3 --version
echo ""
# Create virtual environment
echo "Creating virtual environment..."
if [ ! -d "venv" ]; then
python3 -m venv venv
echo "✅ Virtual environment created"
else
echo "✅ Virtual environment already exists"
fi
echo ""
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
echo "✅ Virtual environment activated"
echo ""
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip setuptools wheel
echo "✅ pip upgraded"
echo ""
# Install dependencies
echo "Installing dependencies..."
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
echo "✅ Main dependencies installed"
else
echo "⚠️ requirements.txt not found"
fi
echo ""
# Install development dependencies
echo "Installing development dependencies..."
pip install -r requirements-dev.txt
echo "✅ Development dependencies installed"
echo ""
# Setup pre-commit
echo "Setting up pre-commit hooks..."
pre-commit install
echo "✅ Pre-commit hooks installed"
echo ""
# Run pre-commit on all files
echo "Running pre-commit on all files..."
pre-commit run --all-files || true
echo "✅ Pre-commit checks completed"
echo ""
echo "=================================="
echo "✅ Setup completed successfully!"
echo ""
echo "Next steps:"
echo "1. Activate venv: source venv/bin/activate"
echo "2. Run tests: pytest tests/ --cov=src/"
echo "3. Start coding!"