Files
2026-10-20 12:09:42 +08:00

28 lines
606 B
Bash
Executable File

#!/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"