Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
MinerU
Commits
b036a03a
Unverified
Commit
b036a03a
authored
Jan 12, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Jan 12, 2025
Browse files
Merge pull request #1510 from myhloli/dev
fix: update resource URLs to jsdelivr
parents
5b9f4f3c
a1c4f22a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
17 additions
and
17 deletions
+17
-17
README_zh-CN.md
README_zh-CN.md
+1
-1
docker/ascend_npu/Dockerfile
docker/ascend_npu/Dockerfile
+3
-3
docker/china/Dockerfile
docker/china/Dockerfile
+3
-3
docs/README_Ascend_NPU_Acceleration_zh_CN.md
docs/README_Ascend_NPU_Acceleration_zh_CN.md
+1
-1
docs/README_Ubuntu_CUDA_Acceleration_zh_CN.md
docs/README_Ubuntu_CUDA_Acceleration_zh_CN.md
+1
-1
docs/how_to_download_models_zh_cn.md
docs/how_to_download_models_zh_cn.md
+2
-2
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
+1
-1
next_docs/zh_cn/user_guide/install/download_model_weight_files.rst
.../zh_cn/user_guide/install/download_model_weight_files.rst
+2
-2
next_docs/zh_cn/user_guide/install/install.rst
next_docs/zh_cn/user_guide/install/install.rst
+1
-1
scripts/download_models.py
scripts/download_models.py
+1
-1
tests/retry_env.sh
tests/retry_env.sh
+1
-1
No files found.
README_zh-CN.md
View file @
b036a03a
...
...
@@ -299,7 +299,7 @@ pip install -U "magic-pdf[full]" --extra-index-url https://wheels.myhloli.com -i
> docker run --rm --gpus=all nvidia/cuda:12.1.0-base-ubuntu22.04 nvidia-smi
> ```
```
bash
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/docker/china/Dockerfile
-O
Dockerfile
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/docker/china/Dockerfile
-O
Dockerfile
docker build
-t
mineru:latest
.
docker run
--rm
-it
--gpus
=
all mineru:latest /bin/bash
-c
"echo 'source /opt/mineru_venv/bin/activate' >> ~/.bashrc && exec bash"
magic-pdf
--help
...
...
docker/ascend_npu/Dockerfile
View file @
b036a03a
...
...
@@ -33,13 +33,13 @@ RUN python3 -m venv /opt/mineru_venv
# Activate the virtual environment and install necessary Python packages
RUN
/bin/bash
-c
"source /opt/mineru_venv/bin/activate &&
\
pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple &&
\
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/docker/ascend_npu/requirements.txt -O requirements.txt &&
\
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/docker/ascend_npu/requirements.txt -O requirements.txt &&
\
pip3 install -r requirements.txt --extra-index-url https://wheels.myhloli.com -i https://mirrors.aliyun.com/pypi/simple &&
\
wget https://gitee.com/ascend/pytorch/releases/download/v6.0.rc2-pytorch2.3.1/torch_npu-2.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl &&
\
pip install torch_npu-2.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl"
# Copy the configuration file template and install magic-pdf latest
RUN
/bin/bash
-c
"wget https://g
itee.com/myhloli
/MinerU
/raw/
master/magic-pdf.template.json &&
\
RUN
/bin/bash
-c
"wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/magic-pdf.template.json &&
\
cp magic-pdf.template.json /root/magic-pdf.json &&
\
source /opt/mineru_venv/bin/activate &&
\
pip3 install -U magic-pdf -i https://mirrors.aliyun.com/pypi/simple"
...
...
@@ -47,7 +47,7 @@ RUN /bin/bash -c "wget https://gitee.com/myhloli/MinerU/raw/master/magic-pdf.tem
# Download models and update the configuration file
RUN
/bin/bash
-c
"source /opt/mineru_venv/bin/activate &&
\
pip3 install modelscope -i https://mirrors.aliyun.com/pypi/simple &&
\
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models.py -O download_models.py &&
\
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models.py -O download_models.py &&
\
python3 download_models.py &&
\
sed -i 's|cpu|npu|g' /root/magic-pdf.json"
...
...
docker/china/Dockerfile
View file @
b036a03a
...
...
@@ -30,19 +30,19 @@ RUN python3 -m venv /opt/mineru_venv
# Activate the virtual environment and install necessary Python packages
RUN
/bin/bash
-c
"source /opt/mineru_venv/bin/activate &&
\
pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple &&
\
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/docker/china/requirements.txt -O requirements.txt &&
\
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/docker/china/requirements.txt -O requirements.txt &&
\
pip3 install -r requirements.txt --extra-index-url https://wheels.myhloli.com -i https://mirrors.aliyun.com/pypi/simple &&
\
pip3 install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/"
# Copy the configuration file template and install magic-pdf latest
RUN
/bin/bash
-c
"wget https://g
itee.com/myhloli
/MinerU
/raw/
master/magic-pdf.template.json &&
\
RUN
/bin/bash
-c
"wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/magic-pdf.template.json &&
\
cp magic-pdf.template.json /root/magic-pdf.json &&
\
source /opt/mineru_venv/bin/activate &&
\
pip3 install -U magic-pdf -i https://mirrors.aliyun.com/pypi/simple"
# Download models and update the configuration file
RUN
/bin/bash
-c
"pip3 install modelscope &&
\
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models.py -O download_models.py &&
\
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models.py -O download_models.py &&
\
python3 download_models.py &&
\
sed -i 's|cpu|cuda|g' /root/magic-pdf.json"
...
...
docs/README_Ascend_NPU_Acceleration_zh_CN.md
View file @
b036a03a
...
...
@@ -16,7 +16,7 @@ OS:openEuler 22.03 (LTS-SP3)
## 构建镜像
请保持网络状况良好,并执行以下代码构建镜像。
```
bash
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/docker/ascend_npu/Dockerfile
-O
Dockerfile
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/docker/ascend_npu/Dockerfile
-O
Dockerfile
docker build
-t
mineru_npu:latest .
```
如果构建过程中未发生报错则说明镜像构建成功。
...
...
docs/README_Ubuntu_CUDA_Acceleration_zh_CN.md
View file @
b036a03a
...
...
@@ -93,7 +93,7 @@ pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com -i h
从仓库中下载样本文件,并测试
```
bash
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/demo/small_ocr.pdf
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/demo/small_ocr.pdf
magic-pdf
-p
small_ocr.pdf
-o
./output
```
...
...
docs/how_to_download_models_zh_cn.md
View file @
b036a03a
...
...
@@ -8,7 +8,7 @@
<summary>
方法一:从 Hugging Face 下载模型
</summary>
<p>
使用python脚本 从Hugging Face下载模型文件
</p>
<pre><code>
pip install huggingface_hub
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models_hf.py -O download_models_hf.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
</code></pre>
<p>
python脚本会自动下载模型文件并配置好配置文件中的模型目录
</p>
</details>
...
...
@@ -19,7 +19,7 @@ python download_models_hf.py</code></pre>
```
bash
pip
install
modelscope
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models.py
-O
download_models.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models.py
-O
download_models.py
python download_models.py
```
python脚本会自动下载模型文件并配置好配置文件中的模型目录
...
...
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst
View file @
b036a03a
...
...
@@ -136,7 +136,7 @@ Ubuntu 22.04 LTS
.. code:: bash
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/demo/small_ocr.pdf
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/demo/small_ocr.pdf
magic-pdf -p small_ocr.pdf -o ./output
9. 测试CUDA加速
...
...
next_docs/zh_cn/user_guide/install/download_model_weight_files.rst
View file @
b036a03a
...
...
@@ -17,7 +17,7 @@
.. code:: bash
pip install huggingface_hub
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models_hf.py -O download_models_hf.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
python脚本会自动下载模型文件并配置好配置文件中的模型目录
...
...
@@ -31,7 +31,7 @@ python脚本会自动下载模型文件并配置好配置文件中的模型目
.. code:: bash
pip install modelscope
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models.py -O download_models.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models.py -O download_models.py
python download_models.py
python脚本会自动下载模型文件并配置好配置文件中的模型目录
...
...
next_docs/zh_cn/user_guide/install/install.rst
View file @
b036a03a
...
...
@@ -90,7 +90,7 @@
.. code-block:: shell
pip install huggingface_hub
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models_hf.py -O download_models_hf.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models_hf.py -O download_models_hf.py
python download_models_hf.py
...
...
scripts/download_models.py
View file @
b036a03a
...
...
@@ -45,7 +45,7 @@ if __name__ == '__main__':
print
(
f
'model_dir is:
{
model_dir
}
'
)
print
(
f
'layoutreader_model_dir is:
{
layoutreader_model_dir
}
'
)
json_url
=
'https://g
itee.com/myhloli
/MinerU
/raw/
master/magic-pdf.template.json'
json_url
=
'https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/magic-pdf.template.json'
config_file_name
=
'magic-pdf.json'
home_dir
=
os
.
path
.
expanduser
(
'~'
)
config_file
=
os
.
path
.
join
(
home_dir
,
config_file_name
)
...
...
tests/retry_env.sh
View file @
b036a03a
...
...
@@ -10,7 +10,7 @@ while true; do
pip
install
-e
.
python
-m
pip
install
paddlepaddle-gpu
==
3.0.0b1
-i
https://www.paddlepaddle.org.cn/packages/stable/cu118/
pip
install
modelscope
wget https://g
itee.com/myhloli
/MinerU
/raw/
master/scripts/download_models.py
-O
download_models.py
wget https://g
core.jsdelivr.net/gh/opendatalab
/MinerU
@
master/scripts/download_models.py
-O
download_models.py
python download_models.py
exit_code
=
$?
if
[
$exit_code
-eq
0
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment