49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
version: "3.8"
|
||
|
||
services:
|
||
mineru_server:
|
||
restart: unless-stopped
|
||
image: quincyqiang/mineru:0.3-models
|
||
container_name: mineru_server
|
||
ports:
|
||
- "8888:8000"
|
||
volumes:
|
||
- /mnt/c/mineru_output:/root/output
|
||
deploy:
|
||
resources:
|
||
reservations:
|
||
devices:
|
||
- driver: nvidia
|
||
count: all
|
||
capabilities: [gpu]
|
||
runtime: nvidia
|
||
environment:
|
||
- NVIDIA_VISIBLE_DEVICES=all
|
||
stdin_open: true
|
||
tty: true
|
||
|
||
# 选项 1:使用 `curl`(PowerShell 中的 `curl` 实际上是 `Invoke-WebRequest` 的别名)
|
||
|
||
# 你可以直接使用 `curl`,但需要调整一些语法来符合 PowerShell 的要求。以下是调整后的请求:
|
||
|
||
# ```shell
|
||
# curl -X POST "http://localhost:8888/pdf_parse" `
|
||
# -H "accept: application/json" `
|
||
# -F "pdf_file=@alakhdar-et-al-2024-diffusion-models-in-de-novo-drug-design.pdf" `
|
||
# -F "parse_method=auto" `
|
||
# -F "is_json_md_dump=true" `
|
||
# -F "output_dir=output"
|
||
# ```
|
||
|
||
# 选项 2:使用 `Invoke-RestMethod`
|
||
|
||
# `Invoke-RestMethod` 也是 PowerShell 中的一个方便工具,可以用来发送 POST 请求。它可以直接处理表单数据:
|
||
|
||
# ```powershell
|
||
# Invoke-RestMethod -Method Post -Uri "http://localhost:8888/pdf_parse" `
|
||
# -Headers @{"accept" = "application/json"} `
|
||
# -Form @{ "pdf_file" = Get-Item "alakhdar-et-al-2024-diffusion-models-in-de-novo-drug-design.pdf"; `
|
||
# "parse_method" = "auto"; `
|
||
# "is_json_md_dump" = "true"; `
|
||
# "output_dir" = "output" }
|
||
# ``` |