-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·67 lines (54 loc) · 1.79 KB
/
install.sh
File metadata and controls
executable file
·67 lines (54 loc) · 1.79 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
#!/bin/bash
# OMCP Python Sandbox Installation Script
set -e
echo "🚀 Installing OMCP Python Sandbox..."
# Check if we're in the right directory
if [ ! -f "pyproject.toml" ]; then
echo "❌ Error: Please run this script from the project root directory"
echo " cd /path/to/omcp_py"
exit 1
fi
# Check Python version
python_version=$(python3 --version 2>&1 | cut -d' ' -f2 | cut -d'.' -f1,2)
required_version="3.10"
if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" != "$required_version" ]; then
echo "❌ Error: Python 3.10 or higher is required. Found: $python_version"
exit 1
fi
echo "✅ Python version: $python_version"
# Check if Docker is running
if ! docker ps > /dev/null 2>&1; then
echo "❌ Error: Docker is not running or not accessible"
echo " Please start Docker and try again"
exit 1
fi
echo "✅ Docker is running"
# Install the package in development mode
echo "📦 Installing package in development mode..."
if command -v uv > /dev/null 2>&1; then
echo " Using uv package manager..."
uv pip install -e .
else
echo " Using pip package manager..."
pip install -e .
fi
echo "✅ Package installed successfully"
# Test the installation
echo "🧪 Testing installation..."
if python3 -c "import omcp_py; print('✅ omcp_py package imported successfully')" 2>/dev/null; then
echo "✅ Package import test passed"
else
echo "❌ Package import test failed"
echo " Try running: pip install -e ."
exit 1
fi
echo ""
echo "🎉 Installation completed successfully!"
echo ""
echo "To start the FastMCP server:"
echo " python src/omcp_py/main.py"
echo ""
echo "To use MCP Inspector:"
echo " npx @modelcontextprotocol/inspector python src/omcp_py/main.py"
echo ""
echo "For more information, see README.md"