-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·75 lines (60 loc) · 2.21 KB
/
setup.sh
File metadata and controls
executable file
·75 lines (60 loc) · 2.21 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
73
74
#!/bin/bash
# Prometheus Setup Script
# This script sets up the Python environment and installs dependencies
set -e
echo "🚀 Setting up Prometheus 3D Generator..."
echo ""
# Check Python version
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.9 or later."
exit 1
fi
PYTHON_VERSION=$(python3 --version | cut -d' ' -f2 | cut -d'.' -f1,2)
PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1)
PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d'.' -f2)
echo "✓ Found Python $PYTHON_VERSION"
# Check Python version compatibility (Shap-E works best with 3.9-3.11)
if [ "$PYTHON_MAJOR" -gt 3 ] || ([ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -gt 11 ]); then
echo "⚠️ Warning: Python $PYTHON_VERSION may not be fully compatible with Shap-E"
echo " Recommended: Python 3.9, 3.10, or 3.11"
echo " Continuing anyway..."
echo ""
fi
# Create virtual environment if it doesn't exist
if [ ! -d "env" ]; then
echo "📦 Creating Python virtual environment..."
python3 -m venv env
echo "✓ Virtual environment created"
else
echo "✓ Virtual environment already exists"
fi
# Activate virtual environment
echo "🔧 Activating virtual environment..."
source env/bin/activate
# Upgrade pip
echo "⬆️ Upgrading pip..."
pip install --upgrade pip --quiet
# Install requirements
echo "📥 Installing Python dependencies..."
echo " This may take a few minutes..."
pip install -r requirements.txt
# Install Shap-E from GitHub (not available on PyPI)
echo ""
echo "📦 Installing Shap-E from GitHub..."
echo " This may take a few minutes..."
pip install git+https://github.com/openai/shap-e.git
# Download MaterialAnything models (optional)
echo ""
echo "📦 MaterialAnything models..."
echo " To download material generation models, run:"
echo " ./download_material_models.sh"
echo " (This is optional and can be done later)"
echo ""
echo "✅ Setup complete!"
echo ""
echo "Next steps:"
echo "1. Open the project in Xcode or build with: swift build"
echo "2. Run the app and start generating 3D models!"
echo ""
echo "Note: First generation will download Shap-E models (~2GB)"
echo " This may take 5-10 minutes depending on your connection."