Skip to content

Latest commit

 

History

History
85 lines (59 loc) · 1.63 KB

File metadata and controls

85 lines (59 loc) · 1.63 KB

Installation & Testing Guide

Quick Installation Test

Run this to verify everything is set up correctly:

# 1. Check Python version (need 3.8+)
python3 --version

# 2. Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Test import
python3 -c "import torch; import transformers; print('✓ Dependencies OK')"

Run Simple Demo

cd examples
python run_demo_simple.py

Expected: Should complete in 1-2 minutes with verification checkmarks ✓

Run Full Demo

cd examples  
python demo.py

Expected: Should show 3 nodes starting up and generating text in 2-5 minutes

Troubleshooting

Issue: ModuleNotFoundError

# Make sure virtual environment is activated
source venv/bin/activate

# Reinstall dependencies
pip install -r requirements.txt

Issue: Port already in use

Wait 10 seconds and try again, or restart your terminal.

Issue: Out of memory

Close other applications or reduce max_new_tokens in demo.py

Verify Installation

Run all checks:

# Check Python
python3 --version

# Check packages
pip list | grep -E "torch|transformers|cryptography"

# Check imports
python3 << EOF
import sys
sys.path.append('..')
from src import security, verification, communication, node, partitioner
print("✓ All modules imported successfully")
EOF

Success Criteria

✅ Simple demo runs and shows verification ✓
✅ Full demo starts 3 nodes
✅ Text generation completes
✅ No errors in output

If all checks pass, you're ready to go! 🚀