From 6ceee7cb5e3d4816707b06112cf136757e8141c7 Mon Sep 17 00:00:00 2001 From: YeYuheng <57035043+YYH211@users.noreply.github.com> Date: Sat, 7 Dec 2024 20:28:40 +0800 Subject: [PATCH] marker doc (#3335) * marker doc * marker doc --- .../docs/development/custom-models/marker.md | 6 +++-- python/pdf-marker/Readme.md | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docSite/content/zh-cn/docs/development/custom-models/marker.md b/docSite/content/zh-cn/docs/development/custom-models/marker.md index 4cccf48f5..ce68431a8 100644 --- a/docSite/content/zh-cn/docs/development/custom-models/marker.md +++ b/docSite/content/zh-cn/docs/development/custom-models/marker.md @@ -21,9 +21,11 @@ PDF 是一个相对复杂的文件格式,在 FastGPT 内置的 pdf 解析器 参考文档 [Marker 安装教程](https://github.com/labring/FastGPT/tree/main/python/pdf-marker),安装 Marker 模型。封装的 API 已经适配了 FastGPT 自定义解析服务。 -这里介绍快速 Docker 按照的方法: +这里介绍快速 Docker 安装的方法: -``` +```dockerfile +docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:latest +docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:latest ``` ### 2. 添加 FastGPT 环境变量 diff --git a/python/pdf-marker/Readme.md b/python/pdf-marker/Readme.md index d0f35cd11..f846ad4da 100644 --- a/python/pdf-marker/Readme.md +++ b/python/pdf-marker/Readme.md @@ -72,20 +72,22 @@ export PROCESSES_PER_GPU="1" # 镜像打包和部署 -## 打包镜像 +## 本地构建镜像 -在 `pdf-marker` 根目录下执行: +1. 在 `pdf-marker` 根目录下执行: -```bash -sudo docker build -t model_pdf -f Dockerfile . + ```bash + sudo docker build -t model_pdf -f Dockerfile . + ``` +2. 运行容器 + ```bash + sudo docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 model_pdf + ``` +## 快速构建镜像 +```dockerfile +docker pull crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:latest +docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 crpi-h3snc261q1dosroc.cn-hangzhou.personal.cr.aliyuncs.com/marker11/marker_images:latest ``` - -## 运行容器 - -```bash -sudo docker run --gpus all -itd -p 7231:7231 --name model_pdf_v1 model_pdf -``` - # 访问示例 用Post方法访问端口为 `7321 ` 的 `v1/parse/file` 服务