Skip to content

Latest commit

 

History

History
257 lines (196 loc) · 5.3 KB

File metadata and controls

257 lines (196 loc) · 5.3 KB

RAPiD Installation Guide

This guide provides comprehensive instructions for installing RAPiD from source code.

📋 Prerequisites

System Requirements

  • Operating System: Linux, macOS, or Windows
  • Python: 3.8 or higher
  • Memory: Minimum 4GB RAM (8GB+ recommended for large point clouds)
  • Storage: 2GB+ free space

Hardware Requirements

  • CPU: Multi-core processor (Intel i5/AMD Ryzen 5 or better)
  • GPU: NVIDIA GPU with CUDA support (optional but recommended)
    • CUDA 11.0 or higher
    • 4GB+ VRAM for large point clouds

🚀 Quick Installation

Using uv (Recommended)

# Install uv if not already installed
pip install uv

# Clone repository
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg

# Install with uv (faster and more reliable)
uv pip install -e .

# Or install with all dependencies
uv pip install -e ".[dev,all]"

From Source (Alternative)

# Clone repository
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg

# Install in development mode
pip install -e .

# Or install with all dependencies
pip install -e ".[dev,all]"

🔧 Installation Methods

Method 1: uv Installation (Recommended)

# 1. Install uv (if not already installed)
pip install uv

# 2. Clone repository
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg

# 3. Create virtual environment with uv (recommended)
uv venv

# 4. Activate virtual environment
source .venv/bin/activate  # Linux/Mac
# or
.venv\Scripts\activate     # Windows

# 5. Install with uv
uv pip install -e ".[dev]"

Alternative: Direct uv Installation

# Clone and install directly with uv
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg
uv pip install -e .

Method 2: Using pip

# 1. Clone repository
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg

# 2. Create virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# or
.venv\Scripts\activate     # Windows

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

# 4. Install in development mode
pip install -e ".[dev]"

Alternative: pip Direct Installation

# Clone and install directly
git clone https://github.com/l1997i/rapid-seg.git
cd rapid-seg
pip install -e .

📦 Dependency Management

Core Dependencies

RAPiD automatically installs these required packages:

  • torch>=2.0.0 - PyTorch deep learning framework
  • einops>=0.7.0 - Tensor operations
  • numpy>=1.21.0 - Numerical computing
  • matplotlib>=3.5.0 - Plotting and visualization
  • psutil>=5.8.0 - System monitoring
  • seaborn>=0.13.2 - Statistical visualization

Optional Dependencies

Development Tools

# Install from source with dev dependencies
cd rapid-seg
pip install -e ".[dev]"

Includes: pytest, black, isort, mypy, jupyter

Documentation Tools

# Install from source with docs dependencies
cd rapid-seg
pip install -e ".[docs]"

Includes: sphinx, sphinx-rtd-theme, myst-parser

All Optional Dependencies

# Install from source with all dependencies
cd rapid-seg
pip install -e ".[all]"

🧪 Verification Installation

Basic Test

# Test import
import rapid_seg
print(f"RAPiD version: {rapid_seg.__version__}")

# Test basic functionality
from rapid_seg import RAPiDCalculator
calculator = RAPiDCalculator()
print("RAPiD calculator created successfully!")

Run Examples

# Navigate to examples directory
cd examples

# Run basic example
python 01_getting_started.py

# Run comprehensive example
python 02_advanced_features.py

Run Tests

# Run all tests
pytest rapid_seg/tests/ -v

# Run with coverage
pytest rapid_seg/tests/ --cov=rapid_seg --cov-report=html

🐛 Troubleshooting

Common Issues

1. Import Errors

# Error: No module named 'rapid_seg'
# Solution: Ensure proper installation from source
cd rapid-seg
pip install -e .

2. CUDA Issues

# Error: CUDA not available
# Solution: Install PyTorch with CUDA support
pip install torch --index-url https://download.pytorch.org/whl/cu118

3. Memory Issues

# Error: CUDA out of memory
# Solution: Reduce batch size or use CPU
device = "cpu"  # Force CPU usage

4. Version Conflicts

# Error: Version conflicts
# Solution: Create clean environment
python -m venv clean-env
source clean-env/bin/activate
cd rapid-seg
pip install -e .

🔄 Updating RAPiD

Update from Source

cd rapid-seg
git pull origin main
pip install -e . --upgrade

Check Current Version

import rapid_seg
print(rapid_seg.__version__)

📚 Next Steps

After successful installation:

  1. Read Documentation: Visit docs/ for detailed guides
  2. Run Examples: Try the examples in examples/
  3. Run Tests: Verify installation with pytest rapid_seg/tests/
  4. Start Coding: Begin using RAPiD in your projects

🤝 Getting Help

If you encounter issues:

  1. Check this guide for common solutions
  2. Review documentation in docs/
  3. Search issues on GitHub
  4. Open new issue with detailed error information
  5. Join discussions on GitHub Discussions

Happy installing! 🚀