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
efbd00bf
Unverified
Commit
efbd00bf
authored
Apr 03, 2025
by
Xiaomeng Zhao
Committed by
GitHub
Apr 03, 2025
Browse files
Merge pull request #2084 from opendatalab/dev
feat(web_api): update configuration and remove unused code
parents
01054426
e38efb97
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
40 deletions
+10
-40
projects/web_api/Dockerfile
projects/web_api/Dockerfile
+6
-6
projects/web_api/README.md
projects/web_api/README.md
+2
-31
projects/web_api/download_models.py
projects/web_api/download_models.py
+1
-0
projects/web_api/magic-pdf.json
projects/web_api/magic-pdf.json
+1
-1
projects/web_api/requirements.txt
projects/web_api/requirements.txt
+0
-2
No files found.
projects/web_api/Dockerfile
View file @
efbd00bf
...
...
@@ -23,10 +23,10 @@ RUN apt-get update && \
COPY
requirements.txt .
RUN
python
-m
venv /app/venv
&&
\
.
/app/venv/bin/activate
&&
\
pip
install
-r
requirements.txt
&&
\
pip uninstall
-y
paddlepaddle
&&
\
pip
install
-i
https://www.paddlepaddle.org.cn/packages/stable/cu118/
\
paddlepaddle-gpu
==
3.0.0rc1
pip
install
-r
requirements.txt
#
pip uninstall -y paddlepaddle && \
#
pip install -i https://www.paddlepaddle.org.cn/packages/stable/cu118/ \
#
paddlepaddle-gpu==3.0.0rc1
# Download models
COPY
download_models.py .
...
...
@@ -51,8 +51,8 @@ RUN apt-get update && \
rm
-rf
/var/lib/apt/lists/
*
# Create volume for paddleocr models
RUN
mkdir
-p
/root/.paddleocr
VOLUME
[ "/root/.paddleocr" ]
#
RUN mkdir -p /root/.paddleocr
#
VOLUME [ "/root/.paddleocr" ]
# Copy the app and its configuration file
COPY
entrypoint.sh /app/entrypoint.sh
...
...
projects/web_api/README.md
View file @
efbd00bf
...
...
@@ -18,11 +18,9 @@ docker build --build-arg http_proxy=http://127.0.0.1:7890 --build-arg https_prox
## 启动命令
```
docker run --rm -it --gpus=all
-v ./paddleocr:/root/.paddleocr
-p 8000:8000 mineru-api
docker run --rm -it --gpus=all -p 8000:8000 mineru-api
```
初次调用 API 时会自动下载 paddleocr 的模型(约数十 MB),其余模型已包含在镜像中。
## 测试参数
访问地址:
...
...
@@ -30,31 +28,4 @@ docker run --rm -it --gpus=all -v ./paddleocr:/root/.paddleocr -p 8000:8000 mine
```
http://localhost:8000/docs
http://127.0.0.1:8000/docs
```
## 旧版镜像地址
> 阿里云地址:docker pull registry.cn-beijing.aliyuncs.com/quincyqiang/mineru:0.1-models
>
> dockerhub地址:docker pull quincyqiang/mineru:0.1-models
## 旧版截图
### 启动命令

具体截图请见博客:https://blog.csdn.net/yanqianglifei/article/details/141979684
### 启动日志

### 测试参数

### 解析效果

```
\ No newline at end of file
projects/web_api/download_models.py
View file @
efbd00bf
...
...
@@ -8,6 +8,7 @@ if __name__ == "__main__":
"models/Layout/YOLO/*"
,
"models/MFD/YOLO/*"
,
"models/MFR/unimernet_hf_small_2503/*"
,
"models/OCR/paddleocr_torch/*"
,
# "models/TabRec/TableMaster/*",
# "models/TabRec/StructEqTable/*",
]
...
...
projects/web_api/magic-pdf.json
View file @
efbd00bf
...
...
@@ -40,5 +40,5 @@
"enable"
:
false
}
},
"config_version"
:
"1.
1.1
"
"config_version"
:
"1.
2.0
"
}
projects/web_api/requirements.txt
View file @
efbd00bf
--extra-index-url https://myhloli.github.io/wheels/
magic-pdf[full]
fastapi
...
...
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