Selaa lähdekoodia

fix: update resource URLs to jsdelivr

- Replace Gitee URLs with jsdelivr URLs in multiple files
- Update Dockerfile instructions to use new URLs
- Modify documentation to reflect new resource location
- Adjust scripts and READMEs to point to new URL for downloads
myhloli 10 kuukautta sitten
vanhempi
commit
a1c4f22a8c

+ 1 - 1
README_zh-CN.md

@@ -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://gitee.com/myhloli/MinerU/raw/master/docker/china/Dockerfile -O Dockerfile
+  wget https://gcore.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

+ 3 - 3
docker/ascend_npu/Dockerfile

@@ -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://gitee.com/myhloli/MinerU/raw/master/docker/ascend_npu/requirements.txt -O requirements.txt && \
+    wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json && \
+RUN /bin/bash -c "wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py && \
+    wget https://gcore.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"
 

+ 3 - 3
docker/china/Dockerfile

@@ -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://gitee.com/myhloli/MinerU/raw/master/docker/china/requirements.txt -O requirements.txt && \
+    wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json && \
+RUN /bin/bash -c "wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py && \
+    wget https://gcore.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"
 

+ 1 - 1
docs/README_Ascend_NPU_Acceleration_zh_CN.md

@@ -16,7 +16,7 @@ OS:openEuler 22.03 (LTS-SP3)
 ## 构建镜像
 请保持网络状况良好,并执行以下代码构建镜像。    
 ```bash
-wget https://gitee.com/myhloli/MinerU/raw/master/docker/ascend_npu/Dockerfile -O Dockerfile
+wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/docker/ascend_npu/Dockerfile -O Dockerfile
 docker build -t mineru_npu:latest .
 ```
 如果构建过程中未发生报错则说明镜像构建成功。

+ 1 - 1
docs/README_Ubuntu_CUDA_Acceleration_zh_CN.md

@@ -93,7 +93,7 @@ pip install -U magic-pdf[full] --extra-index-url https://wheels.myhloli.com -i h
 从仓库中下载样本文件,并测试
 
 ```bash
-wget https://gitee.com/myhloli/MinerU/raw/master/demo/small_ocr.pdf
+wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/demo/small_ocr.pdf
 magic-pdf -p small_ocr.pdf -o ./output
 ```
 

+ 2 - 2
docs/how_to_download_models_zh_cn.md

@@ -8,7 +8,7 @@
   <summary>方法一:从 Hugging Face 下载模型</summary>
   <p>使用python脚本 从Hugging Face下载模型文件</p>
   <pre><code>pip install huggingface_hub
-wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
+wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py
+wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/scripts/download_models.py -O download_models.py
 python download_models.py
 ```
 python脚本会自动下载模型文件并配置好配置文件中的模型目录

+ 1 - 1
next_docs/zh_cn/user_guide/install/boost_with_cuda.rst

@@ -136,7 +136,7 @@ Ubuntu 22.04 LTS
 
 .. code:: bash
 
-   wget https://gitee.com/myhloli/MinerU/raw/master/demo/small_ocr.pdf
+   wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/demo/small_ocr.pdf
    magic-pdf -p small_ocr.pdf -o ./output
 
 9. 测试CUDA加速

+ 2 - 2
next_docs/zh_cn/user_guide/install/download_model_weight_files.rst

@@ -17,7 +17,7 @@
 .. code:: bash
 
    pip install huggingface_hub
-   wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
+   wget https://gcore.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://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py
+   wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/scripts/download_models.py -O download_models.py
    python download_models.py
 
 python脚本会自动下载模型文件并配置好配置文件中的模型目录

+ 1 - 1
next_docs/zh_cn/user_guide/install/install.rst

@@ -90,7 +90,7 @@
 .. code-block:: shell
 
     pip install huggingface_hub
-    wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models_hf.py -O download_models_hf.py
+    wget https://gcore.jsdelivr.net/gh/opendatalab/MinerU@master/scripts/download_models_hf.py -O download_models_hf.py
     python download_models_hf.py
 
 

+ 1 - 1
scripts/download_models.py

@@ -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://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json'
+    json_url = 'https://gcore.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)

+ 1 - 1
tests/retry_env.sh

@@ -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://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py -O download_models.py
+    wget https://gcore.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