Installation
Install DREAM and get ready to use adaptive neural dynamics
Installation
This guide covers installing DREAM (Dynamic Recall and Elastic Adaptive Memory) in your Python environment.
Requirements
Before installing DREAM, ensure you have:
- Python ≥ 3.9
- PyTorch ≥ 2.0.0
- CUDA (optional, for GPU acceleration)
Installation Methods
From PyPI (Recommended)
The easiest way to install DREAM is via PyPI:
pip install dreamnnFrom Source
For the latest development version:
git clone https://github.com/karl4th/dream-nn.git
cd dream-nn
pip install -e .Development Installation
If you want to contribute or access development tools:
pip install -e ".[dev]"This includes:
- Testing frameworks
- Code quality tools
- Development dependencies
Verify Installation
After installation, verify that DREAM is working correctly:
import torch
from dream import DREAM, DREAMConfig
print(f"PyTorch version: {torch.__version__}")
print(f"DREAM available: {DREAM is not None}")
# Quick test
model = DREAM(input_dim=10, hidden_dim=32)
x = torch.randn(2, 5, 10)
output, state = model(x)
print(f"Test passed! Output shape: {output.shape}")Expected output:
PyTorch version: 2.x.x
DREAM available: True
Test passed! Output shape: torch.Size([2, 5, 32])Platform-Specific Instructions
Linux
pip install dreamnnFor GPU support, install PyTorch with CUDA:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install dreamnnmacOS
pip install dreamnnFor Apple Silicon (M1/M2) with MPS support:
pip install torch torchvision torchaudio
pip install dreamnnWindows
pip install dreamnnFor GPU support on Windows:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install dreamnnTroubleshooting
Import Error: No module named 'dream'
Ensure you're in the correct Python environment:
python -m pip install dreamnnOr check your Python path:
python -c "import sys; print(sys.executable)"CUDA Not Available
If you want GPU acceleration but CUDA isn't available:
- Check NVIDIA driver version:
nvidia-smi - Install matching CUDA version
- Reinstall PyTorch with correct CUDA version
Version Conflicts
If you encounter version conflicts:
pip install --upgrade pip
pip install dreamnn --force-reinstallNext Steps
Now that DREAM is installed, check out the Quick Start guide to learn the basics!