This repository has been archived on 2026-02-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-skills/skills/obsidian-kb/.disable_onednn.sh
T
OpenClaw Agent e0a2b323d9 Update obsidian-kb skill and add find-skills
- obsidian-kb: Add OCR processors (easyocr, tesseract)
- obsidian-kb: Fix subtitle detection with test files
- obsidian-kb: Add cookie verification script
- Add find-skills skill for discovering capabilities
- Add video processing scripts
- Update clawhub lock file
2026-02-09 11:53:42 +08:00

31 lines
955 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 禁用 oneDNN 后端,解决 PaddleOCR 兼容性问题
echo "禁用 oneDNN..."
# 方法1:环境变量(临时)
export FLAGS_use_mkldnn=0
echo "✅ 环境变量已设置: FLAGS_use_mkldnn=0"
# 方法2:写入 ~/.bashrc(永久)
if ! grep -q "FLAGS_use_mkldnn=0" ~/.bashrc; then
echo "" >> ~/.bashrc
echo "# 禁用 PaddleOCR 的 oneDNN 后端(解决兼容性问题)" >> ~/.bashrc
echo "export FLAGS_use_mkldnn=0" >> ~/.bashrc
echo "✅ 已写入 ~/.bashrc"
else
echo "ℹ️ ~/.bashrc 中已存在此配置"
fi
echo ""
echo "验证配置..."
if [ "$FLAGS_use_mkldnn" = "0" ]; then
echo "✅ 当前会话: FLAGS_use_mkldnn=$FLAGS_use_mkldnn"
else
echo "⚠️ 当前会话: FLAGS_use_mkldnn=${FLAGS_use_mkldnn:-未设置}"
echo "💡 提示: 运行 'source ~/.bashrc' 使配置生效"
fi
echo ""
echo "完成!现在 PaddleOCR 将使用 CPU 原生计算,避免 oneDNN 兼容性问题。"