File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ Running Miner-U on intel BMG cards
2+
3+ ## 1. Start docker and download models
4+
5+ ``` bash
6+ docker pull intel/llm-scaler-vllm:0.10.0-b3
7+ export DOCKER_IMAGE=intel/llm-scaler-vllm:0.10.0-b3
8+ name=" test-mineru"
9+ docker rm -f $name
10+ docker run -itd \
11+ --net=host \
12+ --device=/dev/dri \
13+ --privileged \
14+ --entrypoint /bin/bash \
15+ --name=$name \
16+ -v /home/intel/LLM:/llm/models/ \
17+ -e http_proxy=your_http_proxy \
18+ -e https_proxy=your_http_proxy \
19+ -e HF_ENDPOINT=https://hf-mirror.com \
20+ -e no_proxy=" 127.0.0.1,localhost" \
21+ --shm-size=" 16g" \
22+ $DOCKER_IMAGE
23+
24+ docker exec -it test-mineru /bin/bash
25+ mineru-models-download
26+ # choose huggingface
27+ # choose pipeline
28+ ```
29+
30+
31+ ## 2. start miner-u and use
32+
33+ offline running:
34+ ``` bash
35+ mineru -p /llm/MinerU/demo/pdfs/small_ocr.pdf -o ./ --source local --device xpu
36+ ```
37+
38+ start api-serving to use:
39+ ``` bash
40+ export MINERU_DEVICE_MODE=" xpu"
41+ mineru-api --host 0.0.0.0 --port 8008
42+
43+ time curl -X POST " http://127.0.0.1:8008/file_parse" \
44+ -F " files=@/llm/MinerU/demo/pdfs/small_ocr.pdf" \
45+ -F " output_dir=./output" \
46+ -F " lang_list=ch"
47+ ```
48+
49+ start gradio web-ui to use:
50+ ``` bash
51+ export MINERU_DEVICE_MODE=" xpu"
52+ mineru-gradio --server-name 0.0.0.0 --server-port 7860
53+ ```
54+
55+ Refer to [ here] ( https://opendatalab.github.io/MinerU/zh/usage/quick_usage/#_2 ) for more details.
You can’t perform that action at this time.
0 commit comments