Browse Source

feat: 1. add link to the readthedocs

xu rui 1 year ago
parent
commit
60b4bd459e

+ 2 - 0
README.md

@@ -1,3 +1,5 @@
+ <a href="https://mineru.readthedocs.io/en/latest/"> <img style="width: 50px; height: 50px"  src="next_docs/en/_static/image/ReadTheDocs.svg"> </a>
+
 <div align="center" xmlns="http://www.w3.org/1999/html">
 <div align="center" xmlns="http://www.w3.org/1999/html">
 <!-- logo -->
 <!-- logo -->
 <p align="center">
 <p align="center">

+ 2 - 0
README_zh-CN.md

@@ -1,3 +1,5 @@
+ <a href="https://mineru.readthedocs.io/en/latest/"> <img style="width: 50px; height: 50px"  src="next_docs/en/_static/image/ReadTheDocs.svg"> </a>
+
 <div align="center" xmlns="http://www.w3.org/1999/html">
 <div align="center" xmlns="http://www.w3.org/1999/html">
 <!-- logo -->
 <!-- logo -->
 <p align="center">
 <p align="center">

File diff suppressed because it is too large
+ 12 - 0
next_docs/en/_static/image/ReadTheDocs.svg


+ 37 - 26
next_docs/en/user_guide/install/boost_with_cuda.rst

@@ -9,16 +9,18 @@ appropriate guide based on your system:
 
 
 -  :ref:`ubuntu_22_04_lts_section`
 -  :ref:`ubuntu_22_04_lts_section`
 -  :ref:`windows_10_or_11_section`
 -  :ref:`windows_10_or_11_section`
+-  Quick Deployment with Docker
 
 
--  Quick Deployment with Docker > Docker requires a GPU with at least
-   16GB of VRAM, and all acceleration features are enabled by default.
+.. admonition:: Important
+   :class: tip
 
 
-.. note:: 
+   Docker requires a GPU with at least 16GB of VRAM, and all acceleration features are enabled by default.
 
 
-   Before running this Docker, you can use the following command to
-   check if your device supports CUDA acceleration on Docker. 
+   Before running this Docker, you can use the following command to check if your device supports CUDA acceleration on Docker. 
 
 
-   bash  docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
+   .. code-block:: bash
+
+      bash  docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
 
 
 .. code:: sh
 .. code:: sh
 
 
@@ -42,8 +44,9 @@ Ubuntu 22.04 LTS
 If you see information similar to the following, it means that the
 If you see information similar to the following, it means that the
 NVIDIA drivers are already installed, and you can skip Step 2.
 NVIDIA drivers are already installed, and you can skip Step 2.
 
 
-Notice:``CUDA Version`` should be >= 12.1, If the displayed version
-number is less than 12.1, please upgrade the driver.
+.. note::
+
+   ``CUDA Version`` should be >= 12.1, If the displayed version number is less than 12.1, please upgrade the driver.
 
 
 .. code:: text
 .. code:: text
 
 
@@ -105,8 +108,10 @@ Specify Python version 3.10.
 
 
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
 
 
-❗ After installation, make sure to check the version of ``magic-pdf``
-using the following command:
+.. admonition:: Important
+    :class: tip
+
+    ❗ After installation, make sure to check the version of ``magic-pdf`` using the following command:
 
 
 .. code:: sh
 .. code:: sh
 
 
@@ -127,7 +132,10 @@ the script will automatically generate a ``magic-pdf.json`` file in the
 user directory and configure the default model path. You can find the
 user directory and configure the default model path. You can find the
 ``magic-pdf.json`` file in your user directory.
 ``magic-pdf.json`` file in your user directory.
 
 
-   The user directory for Linux is “/home/username”.
+.. admonition:: TIP
+    :class: tip
+
+    The user directory for Linux is “/home/username”.
 
 
 8. First Run
 8. First Run
 ~~~~~~~~~~~~
 ~~~~~~~~~~~~
@@ -216,16 +224,16 @@ Python version must be 3.10.
 
 
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
 
 
-..
+.. admonition:: Important
+    :class: tip
 
 
-   ❗️After installation, verify the version of ``magic-pdf``:
+    ❗️After installation, verify the version of ``magic-pdf``:
 
 
-   .. code:: bash
+    .. code:: bash
 
 
       magic-pdf --version
       magic-pdf --version
 
 
-   If the version number is less than 0.7.0, please report it in the
-   issues section.
+    If the version number is less than 0.7.0, please report it in the issues section.
 
 
 5. Download Models
 5. Download Models
 ~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~
@@ -240,7 +248,10 @@ the script will automatically generate a ``magic-pdf.json`` file in the
 user directory and configure the default model path. You can find the
 user directory and configure the default model path. You can find the
 ``magic-pdf.json`` file in your 【user directory】 .
 ``magic-pdf.json`` file in your 【user directory】 .
 
 
-   The user directory for Windows is “C:/Users/username”.
+.. admonition:: Tip
+    :class: tip
+
+    The user directory for Windows is “C:/Users/username”.
 
 
 7. First Run
 7. First Run
 ~~~~~~~~~~~~
 ~~~~~~~~~~~~
@@ -258,23 +269,23 @@ Download a sample file from the repository and test it.
 If your graphics card has at least 8GB of VRAM, follow these steps to
 If your graphics card has at least 8GB of VRAM, follow these steps to
 test CUDA-accelerated parsing performance.
 test CUDA-accelerated parsing performance.
 
 
-1. **Overwrite the installation of torch and torchvision** supporting
-   CUDA.
+1. **Overwrite the installation of torch and torchvision** supporting CUDA.
 
 
-   ::
+.. code:: sh
 
 
-      pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118
+   pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118
 
 
-   ..
+.. admonition:: Important
+    :class: tip
 
 
-      ❗️Ensure the following versions are specified in the command:
+    ❗️Ensure the following versions are specified in the command:
 
 
-      ::
+ 
+    .. code:: sh
 
 
          torch==2.3.1 torchvision==0.18.1
          torch==2.3.1 torchvision==0.18.1
 
 
-      These are the highest versions we support. Installing higher
-      versions without specifying them will cause the program to fail.
+    These are the highest versions we support. Installing higher versions without specifying them will cause the program to fail.
 
 
 2. **Modify the value of ``"device-mode"``** in the ``magic-pdf.json``
 2. **Modify the value of ``"device-mode"``** in the ``magic-pdf.json``
    configuration file located in your user directory.
    configuration file located in your user directory.

+ 22 - 19
next_docs/en/user_guide/install/install.rst

@@ -4,25 +4,28 @@ Install
 If you encounter any installation issues, please first consult the :doc:`../../additional_notes/faq`.
 If you encounter any installation issues, please first consult the :doc:`../../additional_notes/faq`.
 If the parsing results are not as expected, refer to the :doc:`../../additional_notes/known_issues`.
 If the parsing results are not as expected, refer to the :doc:`../../additional_notes/known_issues`.
 
 
-Pre-installation Notice—Hardware and Software Environment Support
-------------------------------------------------------------------
-
-To ensure the stability and reliability of the project, we only optimize
-and test for specific hardware and software environments during
-development. This ensures that users deploying and running the project
-on recommended system configurations will get the best performance with
-the fewest compatibility issues.
-
-By focusing resources on the mainline environment, our team can more
-efficiently resolve potential bugs and develop new features.
-
-In non-mainline environments, due to the diversity of hardware and
-software configurations, as well as third-party dependency compatibility
-issues, we cannot guarantee 100% project availability. Therefore, for
-users who wish to use this project in non-recommended environments, we
-suggest carefully reading the documentation and FAQ first. Most issues
-already have corresponding solutions in the FAQ. We also encourage
-community feedback to help us gradually expand support.
+
+.. admonition:: Warning
+    :class: tip
+
+    **Pre-installation Notice—Hardware and Software Environment Support**
+
+    To ensure the stability and reliability of the project, we only optimize
+    and test for specific hardware and software environments during
+    development. This ensures that users deploying and running the project
+    on recommended system configurations will get the best performance with
+    the fewest compatibility issues.
+
+    By focusing resources on the mainline environment, our team can more
+    efficiently resolve potential bugs and develop new features.
+
+    In non-mainline environments, due to the diversity of hardware and
+    software configurations, as well as third-party dependency compatibility
+    issues, we cannot guarantee 100% project availability. Therefore, for
+    users who wish to use this project in non-recommended environments, we
+    suggest carefully reading the documentation and FAQ first. Most issues
+    already have corresponding solutions in the FAQ. We also encourage
+    community feedback to help us gradually expand support.
 
 
 .. raw:: html
 .. raw:: html
 
 

File diff suppressed because it is too large
+ 12 - 0
next_docs/zh_cn/_static/image/ReadTheDocs.svg


+ 50 - 23
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst

@@ -5,14 +5,16 @@
 
 
 -  :ref:`ubuntu_22_04_lts_section`
 -  :ref:`ubuntu_22_04_lts_section`
 -  :ref:`windows_10_or_11_section`
 -  :ref:`windows_10_or_11_section`
-
+-  使用 Docker 快速部署
+ 
 .. admonition:: Important
 .. admonition:: Important
-   :class: warning
+    :class: tip
 
 
-   使用 Docker 快速部署 > Docker 需要至少 16GB 显存的 GPU,并且所有加速功能默认启用。
-   在运行此 Docker 容器之前,您可以使用以下命令检查您的设备是否支持 Docker 上的 CUDA 加速。
+    Docker 需要至少 16GB 显存的 GPU,并且所有加速功能默认启用。
+   
+    在运行此 Docker 容器之前,您可以使用以下命令检查您的设备是否支持 Docker 上的 CUDA 加速。
 
 
-   .. code-block:: sh
+    .. code-block:: sh
 
 
       bash  docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
       bash  docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
 
 
@@ -26,7 +28,7 @@
 
 
 .. _ubuntu_22_04_lts_section:
 .. _ubuntu_22_04_lts_section:
 
 
-Ubuntu 22.04 LT
+Ubuntu 22.04 LTS
 ----------------
 ----------------
 
 
 1.检查 NVIDIA 驱动程序是否已安装
 1.检查 NVIDIA 驱动程序是否已安装
@@ -37,7 +39,9 @@ Ubuntu 22.04 LT
 
 
 如果您看到类似以下的信息,则表示 NVIDIA 驱动程序已安装,可以跳过第 2 步。
 如果您看到类似以下的信息,则表示 NVIDIA 驱动程序已安装,可以跳过第 2 步。
 
 
-注意:“CUDA 版本”应 >= 12.1,如果显示的版本号小于 12.1,请升级驱动程序。
+.. note::
+
+   ``CUDA 版本`` 应 >= 12.1,如果显示的版本号小于 12.1,请升级驱动程序。
 
 
 .. code:: text
 .. code:: text
 
 
@@ -99,7 +103,10 @@ Ubuntu 22.04 LT
 
 
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
 
 
-❗ 安装完成后,请确保使用以下命令检查 ``magic-pdf`` 的版本:
+.. admonition:: Important
+    :class: tip
+
+    ❗ 安装完成后,请确保使用以下命令检查 ``magic-pdf`` 的版本:
 
 
 .. code:: sh
 .. code:: sh
 
 
@@ -117,7 +124,10 @@ Ubuntu 22.04 LT
 
 
 完成 `6. 下载模型 <#6-download-models>`__ 步骤后,脚本将自动在用户目录中生成一个 ``magic-pdf.json`` 文件并配置默认模型路径。您可以在用户目录中找到 ``magic-pdf.json`` 文件。
 完成 `6. 下载模型 <#6-download-models>`__ 步骤后,脚本将自动在用户目录中生成一个 ``magic-pdf.json`` 文件并配置默认模型路径。您可以在用户目录中找到 ``magic-pdf.json`` 文件。
 
 
-   Linux 用户目录是 “/home/用户名”。
+.. admonition:: Tip
+    :class: tip
+   
+    Linux 用户目录是 “/home/用户名”。
 
 
 8. 首次运行
 8. 首次运行
 ~~~~~~~~~~~~
 ~~~~~~~~~~~~
@@ -148,6 +158,11 @@ Ubuntu 22.04 LT
 
 
       magic-pdf -p small_ocr.pdf -o ./output
       magic-pdf -p small_ocr.pdf -o ./output
 
 
+.. admonition:: Tip
+    :class: tip
+
+    CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,``layout detection cost`` 和 ``mfr time`` 应提速10倍以上。
+
 10. 启用 OCR 的 CUDA 加速
 10. 启用 OCR 的 CUDA 加速
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -163,6 +178,11 @@ Ubuntu 22.04 LT
 
 
       magic-pdf -p small_ocr.pdf -o ./output
       magic-pdf -p small_ocr.pdf -o ./output
 
 
+.. admonition:: Tip
+    :class: tip
+
+    CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下, ``ocr cost`` 应提速10倍以上。
+
 .. _windows_10_or_11_section:
 .. _windows_10_or_11_section:
 
 
 Windows 10/11
 Windows 10/11
@@ -189,7 +209,7 @@ Windows 10/11
 
 
 Python 版本必须是 3.10。
 Python 版本必须是 3.10。
 
 
-::
+.. code:: bash
 
 
    conda create -n MinerU python=3.10
    conda create -n MinerU python=3.10
    conda activate MinerU
    conda activate MinerU
@@ -201,14 +221,16 @@ Python 版本必须是 3.10。
 
 
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
    pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com
 
 
+.. admonition:: Important
+    :class: tip
 
 
-❗️安装完成后,请验证 ``magic-pdf`` 的版本:
+    ❗️安装完成后,请验证 ``magic-pdf`` 的版本:
 
 
-.. code:: bash
+    .. code:: bash
 
 
       magic-pdf --version
       magic-pdf --version
 
 
-如果版本号小于 0.7.0,请在问题部分报告。
+    如果版本号小于 0.7.0,请在问题部分报告。
 
 
 5. 下载模型
 5. 下载模型
 ~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~
@@ -220,7 +242,10 @@ Python 版本必须是 3.10。
 
 
 完成 `5. 下载模型 <#5-download-models>__` 步骤后,脚本将自动在用户目录中生成一个 magic-pdf.json 文件并配置默认模型路径。您可以在【用户目录】中找到 magic-pdf.json 文件。
 完成 `5. 下载模型 <#5-download-models>__` 步骤后,脚本将自动在用户目录中生成一个 magic-pdf.json 文件并配置默认模型路径。您可以在【用户目录】中找到 magic-pdf.json 文件。
 
 
-Windows 用户目录是 “C:/Users/用户名”。
+.. admonition:: Tip
+    :class: tip
+
+    Windows 用户目录是 “C:/Users/用户名”。
 
 
 7. 首次运行
 7. 首次运行
 ~~~~~~~~~~
 ~~~~~~~~~~
@@ -244,15 +269,16 @@ Windows 用户目录是 “C:/Users/用户名”。
 
 
    pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118
    pip install --force-reinstall torch==2.3.1 torchvision==0.18.1 --index-url https://download.pytorch.org/whl/cu118
 
 
-..
+.. admonition:: Important
+    :class: tip
 
 
-   ❗️务必在命令中指定以下版本
+    ❗️务必在命令中指定以下版本
 
 
-   .. code:: bash
+    .. code:: bash
 
 
       torch==2.3.1 torchvision==0.18.1
       torch==2.3.1 torchvision==0.18.1
 
 
-   这是我们支持的最高版本,如果不指定版本会自动安装更高版本导致程序无法运行
+    这是我们支持的最高版本,如果不指定版本会自动安装更高版本导致程序无法运行
 
 
 **2.修改【用户目录】中配置文件magic-pdf.json中”device-mode”的值**
 **2.修改【用户目录】中配置文件magic-pdf.json中”device-mode”的值**
 
 
@@ -268,10 +294,10 @@ Windows 用户目录是 “C:/Users/用户名”。
 
 
    magic-pdf -p small_ocr.pdf -o ./output
    magic-pdf -p small_ocr.pdf -o ./output
 
 
-..
+.. admonition:: Tip
+    :class: tip
 
 
-   提示:CUDA加速是否生效可以根据log中输出的各个阶段的耗时来简单判断,通常情况下,\ ``layout detection time``
-   和 ``mfr time`` 应提速10倍以上。
+    提示:CUDA加速是否生效可以根据log中输出的各个阶段的耗时来简单判断,通常情况下,\ ``layout detection time`` 和 ``mfr time`` 应提速10倍以上。
 
 
 9. 为ocr开启cuda加速
 9. 为ocr开启cuda加速
 ~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~
@@ -288,6 +314,7 @@ Windows 用户目录是 “C:/Users/用户名”。
 
 
    magic-pdf -p small_ocr.pdf -o ./output
    magic-pdf -p small_ocr.pdf -o ./output
 
 
-..
+.. admonition:: Tip
+    :class: tip   
 
 
-提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,\ ``ocr time``\ 应提速10倍以上。
+    提示:CUDA加速是否生效可以根据log中输出的各个阶段cost耗时来简单判断,通常情况下,\ ``ocr time``\ 应提速10倍以上。

+ 7 - 5
next_docs/zh_cn/user_guide/install/install.rst

@@ -4,14 +4,16 @@
 
 
 如果您遇到任何安装问题,请首先查阅 :doc:`../../additional_notes/faq`。如果解析结果不如预期,可参考 :doc:`../../additional_notes/known_issues`。
 如果您遇到任何安装问题,请首先查阅 :doc:`../../additional_notes/faq`。如果解析结果不如预期,可参考 :doc:`../../additional_notes/known_issues`。
 
 
-预安装须知—硬件和软件环境支持
------------------------------
+.. admonition:: Warning
+    :class: tip
 
 
-为了确保项目的稳定性和可靠性,在开发过程中我们仅对特定的硬件和软件环境进行了优化和测试。这确保了在推荐系统配置上部署和运行项目的用户能够获得最佳性能,并且兼容性问题最少。
+    **预安装须知—硬件和软件环境支持**
+    
+    为了确保项目的稳定性和可靠性,在开发过程中我们仅对特定的硬件和软件环境进行了优化和测试。这确保了在推荐系统配置上部署和运行项目的用户能够获得最佳性能,并且兼容性问题最少。
 
 
-通过将资源集中在主线环境中,我们的团队可以更高效地解决潜在的错误并开发新功能。
+    通过将资源集中在主线环境中,我们的团队可以更高效地解决潜在的错误并开发新功能。
 
 
-在非主线环境中,由于硬件和软件配置的多样性以及第三方依赖项的兼容性问题,我们无法保证100%的项目可用性。因此,对于希望在非推荐环境中使用该项目的用户,我们建议首先仔细阅读文档和常见问题解答。大多数问题在常见问题解答中已经有相应的解决方案。我们也鼓励社区反馈,以帮助我们逐步扩大支持。
+    在非主线环境中,由于硬件和软件配置的多样性以及第三方依赖项的兼容性问题,我们无法保证100%的项目可用性。因此,对于希望在非推荐环境中使用该项目的用户,我们建议首先仔细阅读文档和常见问题解答。大多数问题在常见问题解答中已经有相应的解决方案。我们也鼓励社区反馈,以帮助我们逐步扩大支持。
 
 
 
 
 .. raw:: html
 .. raw:: html

Some files were not shown because too many files changed in this diff