-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup.sh
More file actions
50 lines (42 loc) · 1.44 KB
/
Copy pathsetup.sh
File metadata and controls
50 lines (42 loc) · 1.44 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
#!/bin/bash
# Gemma 3n Setup Script
echo "🚀 Setting up Gemma 3n Environment..."
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is required but not installed."
exit 1
fi
# Install Ollama
echo "📦 Installing Ollama..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
curl -fsSL https://ollama.com/install.sh | sh
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install ollama || curl -fsSL https://ollama.com/install.sh | sh
elif [[ "$OSTYPE" == "msys" ]]; then
echo "Please download Ollama from https://ollama.com/download/windows"
echo "Then run this script again."
exit 1
fi
# Start Ollama service
echo "🔧 Starting Ollama service..."
ollama serve &
sleep 5
# Pull Gemma 3n models
echo "⬇️ Downloading Gemma 3n models..."
ollama pull gemma3n:e4b
ollama pull gemma3n:e2b
# Create virtual environment
echo "🐍 Creating Python virtual environment..."
python3 -m venv gemma3n_env
source gemma3n_env/bin/activate
# Install Python dependencies
echo "📚 Installing Python packages..."
pip install --upgrade pip
pip install -r requirements.txt
echo "✅ Setup complete!"
echo ""
echo "To start using Gemma 3n:"
echo "1. Activate environment: source gemma3n_env/bin/activate"
echo "2. Run multimodal chat: streamlit run gemma3n_multimodal_chat.py"
echo "3. Run voice assistant: streamlit run gemma3n_voice_assistant.py"
echo "4. Run coding agent: python gemma3n_coding_agent.py --interactive"