简化依赖管理的解决方案
AIRI项目设计时已考虑降低部署门槛,但仍可能因环境差异遇到依赖问题。以下是分步解决方案:
- 预检环境兼容性:确保系统满足Node.js 22+和pnpm的基本要求,使用
node -v
cap (a poem)pnpm -v
验证版本 - 容器化部署方案:对于复杂环境,推荐使用Docker容器:
- In the project root directory, create the
Dockerfile
- 基于官方Node镜像构建:
FROM node:22-bookworm
- increase
RUN corepack enable && corepack prepare pnpm@latest --activate
- In the project root directory, create the
- 依赖隔离方案:采用虚拟环境工具如volta或nvm管理Node版本,避免全局污染
针对特定报错的处理技巧:
GPU加速相关错误可尝试export WEBGPU_POWER_PREFERENCE='low-power'
降低要求
This answer comes from the articleAIRI: Self-hosted AI virtual companion with support for real-time voice and game interactionThe