tao.mo

MinerU源码上传

mt
2025年10月28日17:44:04
Showing 368 changed files with 681 additions and 0 deletions
1 +*.js linguist-vendored
2 +*.mjs linguist-vendored
3 +*.html linguist-documentation
4 +*.css linguist-vendored
5 +*.scss linguist-vendored
...\ No newline at end of file ...\ No newline at end of file
1 +name: 🐛 Bug Report
2 +description: Create a bug report for MinerU | MinerU 的 Bug 反馈
3 +labels: bug
4 +
5 +# We omit `title: "..."` so that the field defaults to blank. If we set it to
6 +# empty string, Github seems to reject this .yml file.
7 +
8 +body:
9 + - type: markdown
10 + attributes:
11 + value: |
12 + Thank you for submitting a MinerU 🐛 Bug Report! | 感谢您提交 MinerU 🐛 Bug 反馈!
13 +
14 + - type: checkboxes
15 + attributes:
16 + label: 🔎 Search before asking | 提交之前请先搜索
17 + description: >
18 + Please search the MinerU [Readme](https://github.com/opendatalab/MinerU), [Issues](https://github.com/opendatalab/MinerU/issues) and [Discussions](https://github.com/opendatalab/MinerU/discussions) to see if a similar bug report already exists.
19 + options:
20 + - label: I have searched the MinerU [Readme](https://github.com/opendatalab/MinerU) and found no similar bug report.
21 + required: true
22 + - label: I have searched the MinerU [Issues](https://github.com/opendatalab/MinerU/issues) and found no similar bug report.
23 + required: true
24 + - label: I have searched the MinerU [Discussions](https://github.com/opendatalab/MinerU/discussions) and found no similar bug report.
25 + required: true
26 +
27 + - type: checkboxes
28 + attributes:
29 + label: 🤖 Consult the online AI assistant for assistance | 在线 AI 助手咨询
30 + description: >
31 + This [online AI assistant](https://deepwiki.com/opendatalab/MinerU) is specifically trained to help with MinerU and related topics! It's available 24/7 and ready to provide insights.
32 + options:
33 + - label: I have consulted the [online AI assistant](https://deepwiki.com/opendatalab/MinerU) but was unable to obtain a solution to the issue.
34 + required: true
35 +
36 + - type: textarea
37 + id: description
38 + attributes:
39 + label: Description of the bug | 错误描述
40 + description: |
41 + Provide console output with error messages and/or screenshots of the bug. | 请提供详细报错信息或者截图
42 + placeholder: |
43 + 💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
44 + validations:
45 + required: true
46 +
47 + - type: textarea
48 + id: reproduce
49 + attributes:
50 + label: How to reproduce the bug | 如何复现
51 +
52 + # Should not word-wrap this description here.
53 + description: |
54 + If you have questions about the parsing results or encounter errors during execution: | 如对解析结果有疑问或在运行中出现报错等异常:
55 + * Provide a minimal reproducible example. | 请提供一个最小可复现的demo。
56 + * The demo should include the complete steps, code, and the PDF file to be parsed. | demo需要包含完整的操作步骤,代码,以及需要解析的PDF文件。
57 + * When reporting parsing result anomalies and runtime errors, reproducible PDF files are essential. If the document is too large or confidential, you can print the problematic page(s) via the browser and submit the corresponding example file.
58 + * 在反馈解析结果异常和运行时报错时,可复现的PDF文件是必不可少的,如文档过大或涉密,您可通过浏览器打印出出现问题的某一页或某几页再提交相应的示例文件。
59 +
60 +
61 + For problems when building or installing MinerU: | 在构建或安装 MinerU 时遇到的问题:
62 + * Give the **exact** build/install commands that were run. | 提供**确切**的构建/安装命令。
63 + * Give the **complete** output from these commands. | 提供这些命令的**完整**输出。
64 +
65 + validations:
66 + required: true
67 +
68 +# - type: markdown
69 +# attributes:
70 +# value: |
71 +# # The information below is required.
72 +
73 +
74 + - type: dropdown
75 + id: os_mode
76 + attributes:
77 + label: Operating System Mode | 操作系统类型
78 + #multiple: true
79 + options:
80 + -
81 + - Windows
82 + - Linux
83 + - MacOS
84 + validations:
85 + required: true
86 +
87 + - type: textarea
88 + id: os_name_version
89 + attributes:
90 + label: Operating System Version| 操作系统版本
91 + #multiple: true
92 + description: |
93 + * 如果您使用的是Linux系统,请提供Linux系统的**发行版名称**和**版本号**来帮助开发人员排查问题。
94 + * If you are using a Linux system, please provide the Linux distribution and version number to help developers troubleshoot the issue.
95 + * 如果您使用的是Windows或MacOS系统,请提供操作系统的**版本号**来帮助开发人员排查问题。
96 + * If you are using a Windows or MacOS system, please provide the version number of the operating system to help developers troubleshoot the issue.
97 + * 例如:Ubuntu 22.04, CentOS 7.9, MacOS 15.1, Windows 11
98 + * For example: Ubuntu 22.04, CentOS 7.9, MacOS 15.1, Windows 11.
99 +
100 + validations:
101 + required: true
102 +
103 + - type: dropdown
104 + id: python_version
105 + attributes:
106 + label: Python version | Python 版本
107 + #multiple: true
108 + # Need quotes around `3.10` otherwise it is treated as a number and shows as `3.1`.
109 + options:
110 + -
111 + - "3.13"
112 + - "3.12"
113 + - "3.11"
114 + - "3.10"
115 + validations:
116 + required: true
117 +
118 + - type: dropdown
119 + id: software_version
120 + attributes:
121 + label: Software version | 软件版本 (mineru --version)
122 + #multiple: false
123 + options:
124 + -
125 + - "<2.2.0"
126 + - "2.2.x"
127 + - ">=2.5"
128 + validations:
129 + required: true
130 +
131 + - type: dropdown
132 + id: backend_name
133 + attributes:
134 + label: Backend name | 解析后端
135 + #multiple: false
136 + options:
137 + -
138 + - "vlm"
139 + - "pipeline"
140 + validations:
141 + required: true
142 +
143 + - type: dropdown
144 + id: device_mode
145 + attributes:
146 + label: Device mode | 设备模式
147 + #multiple: true
148 + options:
149 + -
150 + - cpu
151 + - cuda
152 + - mps
153 + - npu
154 + validations:
155 + required: true
1 +blank_issues_enabled: false
2 +contact_links:
3 + - name: 🙏 Q&A
4 + url: https://github.com/opendatalab/MinerU/discussions/categories/q-a
5 + about: Ask the community for help
6 + - name: 💡 Feature requests and ideas
7 + url: https://github.com/opendatalab/MinerU/discussions/categories/ideas
8 + about: Share ideas for new features
9 + - name: 🙌 Show and tell
10 + url: https://github.com/opendatalab/MinerU/discussions/categories/show-and-tell
11 + about: Show off something you've made
...\ No newline at end of file ...\ No newline at end of file
1 +Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
2 +
3 +## Motivation
4 +
5 +Please describe the motivation of this PR and the goal you want to achieve through this PR.
6 +
7 +## Modification
8 +
9 +Please briefly describe what modification is made in this PR.
10 +
11 +## BC-breaking (Optional)
12 +
13 +Does the modification introduce changes that break the backward compatibility of the downstream repositories?
14 +If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
15 +
16 +## Use cases (Optional)
17 +
18 +If this PR introduces a new feature, it is better to list some use cases here and update the documentation.
19 +
20 +## Checklist
21 +
22 +**Before PR**:
23 +
24 +- [ ] Pre-commit or other linting tools are used to fix the potential lint issues.
25 +- [ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
26 +- [ ] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
27 +- [ ] The documentation has been modified accordingly, like docstring or example tutorials.
28 +
29 +**After PR**:
30 +
31 +- [ ] If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects.
32 +- [ ] CLA has been signed and all committers have signed the CLA in this PR.
1 +name: "MinerU CLA Assistant"
2 +on:
3 + issue_comment:
4 + types: [created]
5 + pull_request_target:
6 + types: [opened,closed,synchronize]
7 +
8 +# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
9 +permissions:
10 + actions: write
11 + contents: write # this can be 'read' if the signatures are in remote repository
12 + pull-requests: write
13 + statuses: write
14 +
15 +jobs:
16 + CLAAssistant:
17 + runs-on: ubuntu-latest
18 + steps:
19 + - name: "CLA Assistant"
20 + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
21 + uses: contributor-assistant/github-action@v2.6.1
22 + env:
23 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 + # the below token should have repo scope and must be manually added by you in the repository's secret
25 + # This token is required only if you have configured to store the signatures in a remote repository/organization
26 + PERSONAL_ACCESS_TOKEN: ${{ secrets.RELEASE_TOKEN }}
27 + with:
28 + path-to-signatures: 'signatures/version1/cla.json'
29 + path-to-document: 'https://github.com/opendatalab/MinerU/blob/master/MinerU_CLA.md' # e.g. a CLA or a DCO document
30 + # branch should not be protected
31 + branch: 'cla'
32 + allowlist: myhloli,dt-yy,Focusshang,renpengli01,icecraft,drunkpig,wangbinDL,qiangqiang199,GDDGCZ518,papayalove,conghui,quyuan,LollipopsAndWine,Sidney233
33 +
34 + # the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
35 + #remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
36 + #remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
37 + #create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
38 + #signed-commit-message: 'For example: $contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
39 + #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
40 + #custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
41 + #custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
42 + #lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
43 + #use-dco-flag: true - If you are using DCO instead of CLA
1 +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3 +
4 +name: mineru-cli-test
5 +on:
6 + push:
7 + branches:
8 + - "master"
9 + - "dev"
10 + paths-ignore:
11 + - "cmds/**"
12 + - "**.md"
13 +jobs:
14 + cli-test:
15 + if: github.repository == 'opendatalab/MinerU'
16 + runs-on: ubuntu-latest
17 + timeout-minutes: 240
18 + strategy:
19 + fail-fast: true
20 +
21 + steps:
22 + - name: PDF cli
23 + uses: actions/checkout@v4
24 + with:
25 + ref: dev
26 + fetch-depth: 2
27 +
28 + - name: install uv
29 + uses: astral-sh/setup-uv@v5
30 +
31 + - name: install&test
32 + run: |
33 + uv --version
34 + uv venv --python 3.12
35 + source .venv/bin/activate
36 + uv pip install .[test]
37 + cd $GITHUB_WORKSPACE && python tests/clean_coverage.py
38 + cd $GITHUB_WORKSPACE && coverage run
39 + cd $GITHUB_WORKSPACE && python tests/get_coverage.py
40 +
41 + notify_to_feishu:
42 + if: ${{ always() && !cancelled() && contains(needs.*.result, 'failure')}}
43 + needs: cli-test
44 + runs-on: ubuntu-latest
45 + steps:
46 + - name: notify
47 + run: |
48 + curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"post","content":{"post":{"zh_cn":{"title":"'${{ github.repository }}' GitHubAction Failed","content":[[{"tag":"text","text":""},{"tag":"a","text":"Please click here for details ","href":"https://github.com/'${{ github.repository }}'/actions/runs/'${GITHUB_RUN_ID}'"}]]}}}}' ${{ secrets.FEISHU_WEBHOOK_URL }}
1 +name: Publish docs via GitHub Pages
2 +on:
3 + push:
4 + branches:
5 + - "master"
6 + - "dev"
7 +
8 +jobs:
9 + build:
10 + name: Deploy docs
11 + runs-on: ubuntu-latest
12 + steps:
13 + - name: Checkout master
14 + uses: actions/checkout@v4
15 + with:
16 + ref: dev
17 + - name: Deploy docs
18 + uses: mhausenblas/mkdocs-deploy-gh-pages@master
19 + # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
20 + env:
21 + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
22 + REQUIREMENTS: /docs/requirements.txt
1 +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3 +
4 +name: Python package
5 +
6 +on:
7 + push:
8 + tags:
9 + - '*released'
10 + workflow_dispatch:
11 +
12 +
13 +jobs:
14 +
15 + update-version:
16 + runs-on: ubuntu-latest
17 + steps:
18 + - name: Checkout repository
19 + uses: actions/checkout@v4
20 + with:
21 + ref: master
22 + fetch-depth: 0
23 +
24 + - name: Set up Python
25 + uses: actions/setup-python@v5
26 + with:
27 + python-version: "3.10"
28 +
29 + - name: Update version.py
30 + run: |
31 + python update_version.py
32 +
33 + - name: Verify version.py
34 + run: |
35 + ls -l mineru/version.py
36 + cat mineru/version.py
37 +
38 + - name: Commit changes
39 + run: |
40 + git config --local user.email "moe@myhloli.com"
41 + git config --local user.name "myhloli"
42 + git add mineru/version.py
43 + if git diff-index --quiet HEAD; then
44 + echo "No changes to commit"
45 + else
46 + git commit -m "Update version.py with new version"
47 + fi
48 + id: commit_changes
49 +
50 + - name: Push changes
51 + if: steps.commit_changes.outcome == 'success'
52 + env:
53 + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
54 + run: |
55 + git push origin HEAD:master
56 +
57 + check-install:
58 + needs: [ update-version ]
59 + runs-on: ubuntu-latest
60 + strategy:
61 + fail-fast: false
62 + matrix:
63 + python-version: ["3.10", "3.11", "3.12", "3.13"]
64 +
65 + steps:
66 + - name: Checkout code
67 + uses: actions/checkout@v4
68 + with:
69 + ref: master
70 + fetch-depth: 0
71 +
72 + - name: Verify version.py
73 + run: |
74 + ls -l mineru/version.py
75 + cat mineru/version.py
76 +
77 + - name: Set up Python ${{ matrix.python-version }}
78 + uses: actions/setup-python@v5
79 + with:
80 + python-version: ${{ matrix.python-version }}
81 +
82 + - name: Install mineru
83 + run: |
84 + python -m pip install --upgrade pip
85 + pip install -e .[core]
86 +
87 + build:
88 + needs: [ check-install ]
89 + runs-on: ubuntu-latest
90 + strategy:
91 + fail-fast: false
92 + matrix:
93 + python-version: [ "3.10"]
94 +
95 + steps:
96 +
97 + - name: Checkout code
98 + uses: actions/checkout@v4
99 + with:
100 + ref: master
101 + fetch-depth: 0
102 +
103 + - name: Install wheel
104 + run: |
105 + python -m pip install wheel
106 + pip install build
107 +
108 + - name: Build wheel
109 + run: |
110 + python -m build --wheel
111 +
112 + - name: Upload artifact
113 + uses: actions/upload-artifact@v4
114 + with:
115 + name: wheel-file
116 + path: dist/*.whl
117 + retention-days: 30
118 +
119 + release:
120 + needs: [ build ]
121 + runs-on: ubuntu-latest
122 + steps:
123 + - name: Checkout code
124 + uses: actions/checkout@v4
125 +
126 + - name: Download artifact
127 + uses: actions/download-artifact@v4
128 + with:
129 + name: wheel-file
130 + path: dist
131 +
132 + - name: Create and Upload Release
133 + id: create_release
134 + uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
135 + with:
136 + files: './dist/*.whl'
137 + env:
138 + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
139 +
140 + - name: Publish distribution to PyPI
141 + run: |
142 + pip install -U twine id keyring packaging readme-renderer requests requests-toolbelt rfc3986 rich urllib3
143 + twine check dist/*
144 + twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
1 +name: check-status
2 +
3 +on:
4 + workflow_run:
5 + workflows: [ci]
6 + types: [completed]
7 +
8 +jobs:
9 + on-failure:
10 + runs-on: pdf
11 + permissions:
12 + actions: write
13 + if: ${{ (github.event.workflow_run.head_branch == 'master') && github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 3 }}
14 + steps:
15 + - run: |
16 + echo 'The triggering workflow failed'
17 + sleep 600
18 + curl -L \
19 + -X POST \
20 + -H "Accept: application/vnd.github+json" \
21 + -H "Authorization: Bearer ${{ github.token }}" \
22 + -H "X-GitHub-Api-Version: 2022-11-28" \
23 + https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/rerun-failed-jobs
1 +### IntelliJ IDEA ###
2 +.idea
3 +*.iws
4 +*.iml
5 +*.ipr
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
1 +# MinerU Contributor License Agreement
2 +In order to clarify the intellectual property license granted with Contributions from any person or entity, the open source project MinerU ("MinerU") must have a Contributor License Agreement (CLA) on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of MinerU and its users; it does not change your rights to use your own Contributions for any other purpose.
3 +
4 +You accept and agree to the following terms and conditions for Your present and future Contributions submitted to MinerU. Except for the license granted herein to MinerU and recipients of software distributed by MinerU, You reserve all right, title, and interest in and to Your Contributions.
5 +
6 +1. Definitions. "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with MinerU. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "Contribution" shall mean the code, documentation or any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to MinerU for inclusion in, or documentation of, any of the products owned or managed by MinerU (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to MinerU or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, MinerU for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
7 +2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to MinerU and to recipients of software distributed by MinerU a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
8 +3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to MinerU and to recipients of software distributed by MinerU a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
9 +4. You represent that You are legally entitled to grant the above license. If You are an entity, You represent further that each of Your employee designated by You is authorized to submit Contributions on behalf of You. If You are an individual and Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent further that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to MinerU, or that Your employer has executed a separate CLA with MinerU.
10 +5. If you do post content or submit material on MinerU and unless we indicate otherwise, you grant MinerU a nonexclusive, royalty-free, perpetual, irrevocable, and fully sublicensable right to use, reproduce, modify, adapt, publish, perform, translate, create derivative works from, distribute, and display such content throughout the world in any media. You grant MinerU and sublicensees the right to use your GitHub Public Profile, including but not limited to name, that you submit in connection with such content. You represent and warrant that you own or otherwise control all of the rights to the content that you post; that the content is accurate; that use of the content you supply does not violate this policy and will not cause injury to any person or entity; and that you will indemnify MinerU for all claims resulting from content you supply. MinerU has the right but not the obligation to monitor and edit or remove any activity or content. MinerU takes no responsibility and assumes no liability for any content posted by you or any third party.
11 +6. You represent that each of Your Contributions is Your original creation. Should You wish to submit work that is not Your original creation, You may submit it to MinerU separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
12 +7. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
13 +8. You agree to notify MinerU of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect.
14 +9. MinerU reserves the right to update or change this Agreement at any time, by posting the most current version of the Agreement on MinerU, with a new Effective Date shown on Jul. 24th, 2024. All such changes in the Agreement are effective from the Effective Date. Your continued use of MinerU after we post any such changes signifies your agreement to those changes. If you do not agree to the then-current Agreement, you must immediately discontinue using MinerU.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 +# Security Policy
2 +
3 +## Supported Versions
4 +
5 +latest
6 +
7 +## Reporting a Vulnerability
8 +
9 +Please do not report security vulnerabilities through public GitHub issues.
10 +
11 +Instead, please report them at https://github.com/opendatalab/MinerU/security.
12 +
13 +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
14 +
15 + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
16 + * Full paths of source file(s) related to the manifestation of the issue
17 + * The location of the affected source code (tag/branch/commit or direct URL)
18 + * Any special configuration required to reproduce the issue
19 + * Step-by-step instructions to reproduce the issue
20 + * Proof-of-concept or exploit code (if possible)
21 + * Impact of the issue, including how an attacker might exploit the issue
22 +
23 +This information will help us triage your report more quickly.
24 +
25 +## Preferred Languages
26 +
27 +We prefer all communications to be in English and Chinese.
28 +
29 +## Policy
30 +
31 +We will fix security issues in the project's own code as quickly as possible. Before the project completes the fix, you must not disclose the vulnerability information to any public platform.
This diff is collapsed. Click to expand it.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 +# Use DaoCloud mirrored vllm image for China region for gpu with Ampere architecture and above (Compute Capability>=8.0)
2 +# Compute Capability version query (https://developer.nvidia.com/cuda-gpus)
3 +FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.1.1
4 +
5 +# Use the official vllm image
6 +# FROM vllm/vllm-openai:v0.10.1.1
7 +
8 +# Use DaoCloud mirrored vllm image for China region for gpu with Turing architecture and below (Compute Capability<8.0)
9 +# FROM docker.m.daocloud.io/vllm/vllm-openai:v0.10.2
10 +
11 +# Use the official vllm image
12 +# FROM vllm/vllm-openai:v0.10.2
13 +
14 +# Install libgl for opencv support & Noto fonts for Chinese characters
15 +RUN apt-get update && \
16 + apt-get install -y \
17 + fonts-noto-core \
18 + fonts-noto-cjk \
19 + fontconfig \
20 + libgl1 && \
21 + fc-cache -fv && \
22 + apt-get clean && \
23 + rm -rf /var/lib/apt/lists/*
24 +
25 +# Install mineru latest
26 +RUN python3 -m pip install -U 'mineru[core]' -i https://mirrors.aliyun.com/pypi/simple --break-system-packages && \
27 + python3 -m pip cache purge
28 +
29 +# Download models and update the configuration file
30 +RUN /bin/bash -c "mineru-models-download -s modelscope -m all"
31 +
32 +# Set the entry point to activate the virtual environment and run the command line tool
33 +ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
...\ No newline at end of file ...\ No newline at end of file
1 +services:
2 + mineru-vllm-server:
3 + image: mineru-vllm:latest
4 + container_name: mineru-vllm-server
5 + restart: always
6 + profiles: ["vllm-server"]
7 + ports:
8 + - 30000:30000
9 + environment:
10 + MINERU_MODEL_SOURCE: local
11 + entrypoint: mineru-vllm-server
12 + command:
13 + --host 0.0.0.0
14 + --port 30000
15 + # --data-parallel-size 2 # If using multiple GPUs, increase throughput using vllm's multi-GPU parallel mode
16 + # --gpu-memory-utilization 0.5 # If running on a single GPU and encountering VRAM shortage, reduce the KV cache size by this parameter, if VRAM issues persist, try lowering it further to `0.4` or below.
17 + ulimits:
18 + memlock: -1
19 + stack: 67108864
20 + ipc: host
21 + healthcheck:
22 + test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"]
23 + deploy:
24 + resources:
25 + reservations:
26 + devices:
27 + - driver: nvidia
28 + device_ids: ["0"]
29 + capabilities: [gpu]
30 +
31 + mineru-api:
32 + image: mineru-vllm:latest
33 + container_name: mineru-api
34 + restart: always
35 + profiles: ["api"]
36 + ports:
37 + - 8000:8000
38 + environment:
39 + MINERU_MODEL_SOURCE: local
40 + entrypoint: mineru-api
41 + command:
42 + --host 0.0.0.0
43 + --port 8000
44 + # parameters for vllm-engine
45 + # --data-parallel-size 2 # If using multiple GPUs, increase throughput using vllm's multi-GPU parallel mode
46 + # --gpu-memory-utilization 0.5 # If running on a single GPU and encountering VRAM shortage, reduce the KV cache size by this parameter, if VRAM issues persist, try lowering it further to `0.4` or below.
47 + ulimits:
48 + memlock: -1
49 + stack: 67108864
50 + ipc: host
51 + deploy:
52 + resources:
53 + reservations:
54 + devices:
55 + - driver: nvidia
56 + device_ids: [ "0" ]
57 + capabilities: [ gpu ]
58 +
59 + mineru-gradio:
60 + image: mineru-vllm:latest
61 + container_name: mineru-gradio
62 + restart: always
63 + profiles: ["gradio"]
64 + ports:
65 + - 7860:7860
66 + environment:
67 + MINERU_MODEL_SOURCE: local
68 + entrypoint: mineru-gradio
69 + command:
70 + --server-name 0.0.0.0
71 + --server-port 7860
72 + --enable-vllm-engine true # Enable the vllm engine for Gradio
73 + # --enable-api false # If you want to disable the API, set this to false
74 + # --max-convert-pages 20 # If you want to limit the number of pages for conversion, set this to a specific number
75 + # parameters for vllm-engine
76 + # --data-parallel-size 2 # If using multiple GPUs, increase throughput using vllm's multi-GPU parallel mode
77 + # --gpu-memory-utilization 0.5 # If running on a single GPU and encountering VRAM shortage, reduce the KV cache size by this parameter, if VRAM issues persist, try lowering it further to `0.4` or below.
78 + ulimits:
79 + memlock: -1
80 + stack: 67108864
81 + ipc: host
82 + deploy:
83 + resources:
84 + reservations:
85 + devices:
86 + - driver: nvidia
87 + device_ids: [ "0" ]
88 + capabilities: [ gpu ]
1 +# Use the official vllm image for gpu with Ampere architecture and above (Compute Capability>=8.0)
2 +# Compute Capability version query (https://developer.nvidia.com/cuda-gpus)
3 +FROM vllm/vllm-openai:v0.10.1.1
4 +
5 +# Use the official vllm image for gpu with Turing architecture and below (Compute Capability<8.0)
6 +# FROM vllm/vllm-openai:v0.10.2
7 +
8 +# Install libgl for opencv support & Noto fonts for Chinese characters
9 +RUN apt-get update && \
10 + apt-get install -y \
11 + fonts-noto-core \
12 + fonts-noto-cjk \
13 + fontconfig \
14 + libgl1 && \
15 + fc-cache -fv && \
16 + apt-get clean && \
17 + rm -rf /var/lib/apt/lists/*
18 +
19 +# Install mineru latest
20 +RUN python3 -m pip install -U 'mineru[core]' --break-system-packages && \
21 + python3 -m pip cache purge
22 +
23 +# Download models and update the configuration file
24 +RUN /bin/bash -c "mineru-models-download -s huggingface -m all"
25 +
26 +# Set the entry point to activate the virtual environment and run the command line tool
27 +ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
No preview for this file type
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.