compose.yaml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. services:
  2. mineru-openai-server:
  3. image: mineru:latest
  4. container_name: mineru-openai-server
  5. restart: always
  6. profiles: ["openai-server"]
  7. ports:
  8. - 30000:30000
  9. environment:
  10. MINERU_MODEL_SOURCE: local
  11. entrypoint: mineru-openai-server
  12. command:
  13. # ==================== Engine Selection ====================
  14. # WARNING: Only ONE engine can be enabled at a time!
  15. # Choose 'vllm' OR 'lmdeploy' (uncomment one line below)
  16. --engine vllm
  17. # --engine lmdeploy
  18. # ==================== vLLM Engine Parameters ====================
  19. # Uncomment if using --engine vllm
  20. --host 0.0.0.0
  21. --port 30000
  22. # Multi-GPU configuration (increase throughput)
  23. # --data-parallel-size 2
  24. # Single GPU memory optimization (reduce if VRAM insufficient)
  25. # --gpu-memory-utilization 0.5 # Try 0.4 or lower if issues persist
  26. # ==================== LMDeploy Engine Parameters ====================
  27. # Uncomment if using --engine lmdeploy
  28. # --server-name 0.0.0.0
  29. # --server-port 30000
  30. # Multi-GPU configuration (increase throughput)
  31. # --dp 2
  32. # Single GPU memory optimization (reduce if VRAM insufficient)
  33. # --cache-max-entry-count 0.5 # Try 0.4 or lower if issues persist
  34. ulimits:
  35. memlock: -1
  36. stack: 67108864
  37. ipc: host
  38. healthcheck:
  39. test: ["CMD-SHELL", "curl -f http://localhost:30000/health || exit 1"]
  40. deploy:
  41. resources:
  42. reservations:
  43. devices:
  44. - driver: nvidia
  45. device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
  46. capabilities: [gpu]
  47. mineru-api:
  48. image: mineru:latest
  49. container_name: mineru-api
  50. restart: always
  51. profiles: ["api"]
  52. ports:
  53. - 8000:8000
  54. environment:
  55. MINERU_MODEL_SOURCE: local
  56. entrypoint: mineru-api
  57. command:
  58. # ==================== Server Configuration ====================
  59. --host 0.0.0.0
  60. --port 8000
  61. # ==================== vLLM Engine Parameters ====================
  62. # Multi-GPU configuration
  63. # --data-parallel-size 2
  64. # Single GPU memory optimization
  65. # --gpu-memory-utilization 0.5 # Try 0.4 or lower if VRAM insufficient
  66. # ==================== LMDeploy Engine Parameters ====================
  67. # Multi-GPU configuration
  68. # --dp 2
  69. # Single GPU memory optimization
  70. # --cache-max-entry-count 0.5 # Try 0.4 or lower if VRAM insufficient
  71. ulimits:
  72. memlock: -1
  73. stack: 67108864
  74. ipc: host
  75. deploy:
  76. resources:
  77. reservations:
  78. devices:
  79. - driver: nvidia
  80. device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
  81. capabilities: [gpu]
  82. mineru-gradio:
  83. image: mineru:latest
  84. container_name: mineru-gradio
  85. restart: always
  86. profiles: ["gradio"]
  87. ports:
  88. - 7860:7860
  89. environment:
  90. MINERU_MODEL_SOURCE: local
  91. entrypoint: mineru-gradio
  92. command:
  93. # ==================== Gradio Server Configuration ====================
  94. --server-name 0.0.0.0
  95. --server-port 7860
  96. # ==================== Gradio Feature Settings ====================
  97. # --enable-api false # Disable API endpoint
  98. # --max-convert-pages 20 # Limit conversion page count
  99. # ==================== Engine Selection ====================
  100. # WARNING: Only ONE engine can be enabled at a time!
  101. # Option 1: vLLM Engine (recommended for most users)
  102. --enable-vllm-engine true
  103. # Multi-GPU configuration
  104. # --data-parallel-size 2
  105. # Single GPU memory optimization
  106. # --gpu-memory-utilization 0.5 # Try 0.4 or lower if VRAM insufficient
  107. # Option 2: LMDeploy Engine
  108. # --enable-lmdeploy-engine true
  109. # Multi-GPU configuration
  110. # --dp 2
  111. # Single GPU memory optimization
  112. # --cache-max-entry-count 0.5 # Try 0.4 or lower if VRAM insufficient
  113. ulimits:
  114. memlock: -1
  115. stack: 67108864
  116. ipc: host
  117. deploy:
  118. resources:
  119. reservations:
  120. devices:
  121. - driver: nvidia
  122. device_ids: ["0"] # Modify for multiple GPUs: ["0", "1"]
  123. capabilities: [gpu]