Skip to content

DeepInfer: High-performance, large-scale inference framework for DeepSeek models

Python
606 B
Raw Blame
#!/bin/bash

set -euo pipefail

case "${DEEPINFER_ACCELERATOR:-}" in
    nvidia|ascend) ;;
    *)
        echo "Usage: DEEPINFER_ACCELERATOR=nvidia|ascend $0" >&2
        exit 1
        ;;
esac

# Install other Python dependencies
pip install -r "requirements-${DEEPINFER_ACCELERATOR}.txt"

if [ "${DEEPINFER_ACCELERATOR}" = nvidia ]; then
    # Patch NCCL to 2.32.3
    pip install --no-deps --force-reinstall nvidia-nccl-cu13==2.32.3
fi

# Build and install vendored dependencies
bash ./scripts/build_vendor.sh

# Build DeepInfer
bash ./scripts/build.sh build

echo "✅ DeepInfer is successfully built"