Installation Guide

System Requirements

Python Version - Python 3.10+

Dependencies - PyTorch 2.4+ - CUDA 12.4

Installation Methods

Source Installation

  1. Clone the repository:

    git clone https://github.com/alibaba/RecIS.git
    cd recis
    git submodule update --init --recursive
    
  2. Build and install RecIS:

    bash build.sh 0
    pip install `find ./dist -name "recis*.whl" -maxdepth 1`
    
  3. Build and install column-io:

    cd third_party/column-io/
    bash tools/build_and_install.sh 0
    
  4. Verify installation:

    python -c "import recis; print('RecIS installed successfully!')"
    

Installation Verification

Run the following code to verify successful installation:

import torch
import recis

# Check versions
print(f"PyTorch version: {torch.__version__}")

# Check GPU support
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
    print(f"CUDA version: {torch.version.cuda}")
    print(f"GPU count: {torch.cuda.device_count()}")

# Simple functionality test
from recis.nn.modules.embedding import DynamicEmbedding, EmbeddingOption

emb_opt = EmbeddingOption(embedding_dim=16)
emb = DynamicEmbedding(emb_opt)
print("RecIS core modules loaded successfully!")

If the above code runs without errors, RecIS has been successfully installed.