myhloli 78a0208425 docs(installation): remove numpy version restriction from PyTorch installation instructions 6 meses atrás
..
chemical_knowledge_introduction aa3df5ffd1 feat: using next_docs 1 ano atrás
images 2c63e595da update logo 10 meses atrás
FAQ_en_us.md 8e7b6ab199 docs(faq): add troubleshooting guide for old GPUs encountering CUDA errors 10 meses atrás
FAQ_zh_cn.md 8e7b6ab199 docs(faq): add troubleshooting guide for old GPUs encountering CUDA errors 10 meses atrás
README_Ascend_NPU_Acceleration_zh_CN.md 4fd8d626c4 docs(install): update Python version requirements and simplify torch installation 7 meses atrás
README_Ubuntu_CUDA_Acceleration_en_US.md 9f0d45bb58 docs(installation): update Python version and CUDA installation instructions 6 meses atrás
README_Ubuntu_CUDA_Acceleration_zh_CN.md 9f0d45bb58 docs(installation): update Python version and CUDA installation instructions 6 meses atrás
README_Windows_CUDA_Acceleration_en_US.md 78a0208425 docs(installation): remove numpy version restriction from PyTorch installation instructions 6 meses atrás
README_Windows_CUDA_Acceleration_zh_CN.md 78a0208425 docs(installation): remove numpy version restriction from PyTorch installation instructions 6 meses atrás
how_to_download_models_en.md 4fd8d626c4 docs(install): update Python version requirements and simplify torch installation 7 meses atrás
how_to_download_models_zh_cn.md 4fd8d626c4 docs(install): update Python version requirements and simplify torch installation 7 meses atrás
output_file_en_us.md aa3df5ffd1 feat: using next_docs 1 ano atrás
output_file_zh_cn.md aa3df5ffd1 feat: using next_docs 1 ano atrás

README_Ascend_NPU_Acceleration_zh_CN.md

Ascend NPU 加速

简介

本文档介绍如何在 Ascend NPU 上使用 MinerU。本文档内容已在华为 Atlas 800T A2服务器上测试通过。

CPU:鲲鹏 920 aarch64 2.6GHz
NPU:Ascend 910B 64GB
OS:openEuler 22.03 (LTS-SP3)/ Ubuntu 22.04.5 LTS
CANN:8.0.RC2
驱动版本:24.1.rc2.1

由于适配 Ascend NPU 的环境较为复杂,建议使用 Docker 容器运行 MinerU。

通过docker运行MinerU前需确保物理机已安装支持CANN 8.0.RC2的驱动和固件。

构建镜像

请保持网络状况良好,并执行以下代码构建镜像。

wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/ascend_npu/Dockerfile -O Dockerfile
docker build -t mineru_npu:latest .

如果构建过程中未发生报错则说明镜像构建成功。

运行容器

docker run -it -u root --name mineru-npu --privileged=true \
    --ipc=host \
    --network=host \
    --device=/dev/davinci0 \
    --device=/dev/davinci1 \
    --device=/dev/davinci2 \
    --device=/dev/davinci3 \
    --device=/dev/davinci4 \
    --device=/dev/davinci5 \
    --device=/dev/davinci6 \
    --device=/dev/davinci7 \
    --device=/dev/davinci_manager \
    --device=/dev/devmm_svm \
    --device=/dev/hisi_hdc \
    -v /var/log/npu/:/usr/slog \
    -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
    -v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
    mineru_npu:latest \
    /bin/bash -c "echo 'source /opt/mineru_venv/bin/activate' >> ~/.bashrc && exec bash"

magic-pdf --help