Installation¶
This guide covers installing SolanaLM for development and production use.
Prerequisites¶
Before installing SolanaLM, ensure you have the following:
| Requirement | Version | Notes |
|---|---|---|
| Python | 3.12+ | Required for all components |
| Poetry | Latest | Recommended for dependency management |
| RAM | 8GB+ | 16GB+ recommended for local inference |
| GPU | Optional | CUDA-compatible GPU for faster inference |
| Solana CLI | Optional | For mainnet/testnet integration |
Installation Methods¶
Poetry provides the best dependency management experience:
For environments where Poetry isn't available:
# Clone the repository
git clone https://github.com/solanalm/solanalm.git
cd solanalm
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Verify installation
python scripts/verify_setup.py
Verify Installation¶
Run the verification script to check your setup:
Expected output:
✓ Python version: 3.12.0
✓ Poetry installed
✓ Dependencies installed
✓ PyTorch available
✓ CUDA available (optional)
✓ Solana SDK available
✓ Hardware detection working
- CPU: 8 cores
- RAM: 16 GB
- GPU: NVIDIA RTX 3080 (optional)
GPU Support¶
For GPU-accelerated inference, ensure you have:
- NVIDIA GPU with CUDA support
- CUDA Toolkit 11.8 or higher
- cuDNN library
Install PyTorch with CUDA support:
# For CUDA 11.8
pip install torch --index-url https://download.pytorch.org/whl/cu118
# For CUDA 12.1
pip install torch --index-url https://download.pytorch.org/whl/cu121
Verify GPU availability:
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
print(f"GPU count: {torch.cuda.device_count()}")
if torch.cuda.is_available():
print(f"GPU name: {torch.cuda.get_device_name(0)}")
Optional Dependencies¶
External API Support¶
For proxy nodes that connect to external APIs:
Set API keys in your environment:
Development Tools¶
For contributing to SolanaLM:
# Install development dependencies
poetry install --with dev
# Or with pip
pip install black flake8 mypy pytest pytest-asyncio
Troubleshooting¶
Common Issues¶
Poetry install fails with dependency conflicts
Try clearing the cache and reinstalling:
PyTorch not detecting GPU
- Verify CUDA installation:
nvidia-smi - Check PyTorch CUDA version matches system CUDA
- Reinstall PyTorch with correct CUDA version
Import errors after installation
Ensure you're in the correct virtual environment:
Getting Help¶
If you encounter issues:
- Check the GitHub Issues
- Join our Discord community
- Run diagnostics:
python scripts/verify_setup.py --verbose
Next Steps¶
- Quick Start Guide - Get your first inference running
- Configuration - Configure your environment
- Running Nodes - Start contributing to the network